-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               10.1.29-MariaDB - mariadb.org binary distribution
-- Server OS:                    Win32
-- HeidiSQL Version:             12.1.0.6537
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

-- Dumping structure for table gl_noliktava.gl_mervienibas
CREATE TABLE IF NOT EXISTS `gl_mervienibas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nosaukums` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table gl_noliktava.gl_mervienibas: ~7 rows (approximately)
INSERT INTO `gl_mervienibas` (`id`, `nosaukums`) VALUES
	(1, 'gabals'),
	(2, 'komplekti'),
	(3, 'metri'),
	(4, 'kg'),
	(5, 'litri'),
	(6, 'tonnas'),
	(7, '');

-- Dumping structure for table gl_noliktava.gl_noliktava
CREATE TABLE IF NOT EXISTS `gl_noliktava` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `preces_id` int(11) DEFAULT NULL,
  `cena` decimal(6,2) DEFAULT NULL,
  `datums` date DEFAULT NULL,
  `uznemejs` int(11) DEFAULT NULL,
  `serijas_nr` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `skaits` int(11) DEFAULT NULL,
  `mer_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_gl_noliktava_gl_prece` (`preces_id`),
  KEY `FK_gl_noliktava_gl_uznemejs` (`uznemejs`),
  KEY `FK_gl_noliktava_gl_mervienibas` (`mer_id`),
  CONSTRAINT `FK_gl_noliktava_gl_mervienibas` FOREIGN KEY (`mer_id`) REFERENCES `gl_mervienibas` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `FK_gl_noliktava_gl_prece` FOREIGN KEY (`preces_id`) REFERENCES `gl_prece` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `FK_gl_noliktava_gl_uznemejs` FOREIGN KEY (`uznemejs`) REFERENCES `gl_uznemejs` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table gl_noliktava.gl_noliktava: ~37 rows (approximately)
INSERT INTO `gl_noliktava` (`id`, `preces_id`, `cena`, `datums`, `uznemejs`, `serijas_nr`, `skaits`, `mer_id`) VALUES
	(1, 4, 23.00, '2023-11-08', 1, '2', 12, 5),
	(2, 4, 0.01, '2023-11-08', 1, '24345', 2, 3),
	(3, 4, 0.01, '2023-11-08', 1, '24345', 2, 3),
	(5, 5, 0.00, '0000-00-00', 3, '', 0, 6),
	(7, 5, 0.00, '0000-00-00', 3, '', 0, 6),
	(10, 5, 0.00, '0000-00-00', 3, '', 0, 6),
	(11, 5, 0.00, '0000-00-00', 3, '', 0, 6),
	(12, 5, 0.00, '0000-00-00', 3, '', 0, 6),
	(13, 5, 0.00, '0000-00-00', 3, '', 0, 6),
	(21, 6, 0.02, '2023-12-18', 7, '33', 2, 3),
	(22, 7, 0.03, '2023-12-18', 9, '323', 2, 3),
	(23, 5, 0.00, '0000-00-00', 3, '', 0, 7),
	(24, 4, NULL, '2023-12-18', 11, '', 1, NULL),
	(25, 4, NULL, '2023-12-18', 11, '333', -1, NULL),
	(26, 4, NULL, '2023-12-18', 11, '3', -5, NULL),
	(27, 8, 0.00, '2023-12-18', 12, '69123', 1, 6),
	(28, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(29, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(30, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(31, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(32, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(33, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(34, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(35, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(36, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(37, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(38, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(39, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(40, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(41, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(42, 9, 69.00, '2023-12-18', 13, '6969', 69, 1),
	(43, 10, 0.03, '2023-12-18', 9, '33', 3, 2),
	(44, 11, 43.00, '2023-12-18', 16, '6969', 65, 1),
	(45, 10, 0.03, '2023-12-18', 9, '33', 3, 2),
	(46, 10, 0.03, '2023-12-18', 9, '33', 3, 2),
	(47, 12, 333.00, '2023-12-18', 17, '6969', 34, 2),
	(48, 4, NULL, '2023-12-18', 11, '333', -5, NULL);

-- Dumping structure for table gl_noliktava.gl_prece
CREATE TABLE IF NOT EXISTS `gl_prece` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nosaukums` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `kods` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table gl_noliktava.gl_prece: ~9 rows (approximately)
INSERT INTO `gl_prece` (`id`, `nosaukums`, `kods`) VALUES
	(4, 'fgfgf', 4534),
	(5, '', 0),
	(6, 'bfgbf', 1),
	(7, 'jtyjt', 12),
	(8, 'dzordz', 999),
	(9, '6969', 6969),
	(10, 'jtyjt', 333),
	(11, 'wasd', 6969),
	(12, 'jtyjt', 950952);

-- Dumping structure for table gl_noliktava.gl_uznemejs
CREATE TABLE IF NOT EXISTS `gl_uznemejs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vards` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `uzvards` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `statuss` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- Dumping data for table gl_noliktava.gl_uznemejs: ~17 rows (approximately)
INSERT INTO `gl_uznemejs` (`id`, `vards`, `uzvards`, `statuss`) VALUES
	(1, 'antons', NULL, 0),
	(2, 'mjjau', NULL, 0),
	(3, '', NULL, 0),
	(4, 'DFFS', NULL, 0),
	(5, 'r', NULL, 0),
	(6, 'wasd', NULL, 0),
	(7, 'bfgbf', '', 0),
	(8, 'ffss', 'dsdf', 0),
	(9, 'mjjau', 'dsdf', 0),
	(10, 'vdv', 'dvv', 1),
	(11, 'wdd', 'dvv', 1),
	(12, 'laura', 'ivanova', 0),
	(13, '6969', '6969', 0),
	(14, '', '', 1),
	(15, 'RGG', 'dvv', 1),
	(16, 'wasd', 'wasd', 0),
	(17, 'lo', 'hs', 0);

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
