-- --------------------------------------------------------
-- Host:                         109.106.254.1
-- Server version:               10.11.7-MariaDB-cll-lve - MariaDB Server
-- Server OS:                    Linux
-- HeidiSQL Version:             12.6.0.6765
-- --------------------------------------------------------

/*!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 database structure for u353443769_beis
CREATE DATABASE IF NOT EXISTS `u353443769_beis` /*!40100 DEFAULT CHARACTER SET utf32 COLLATE utf32_unicode_ci */;
USE `u353443769_beis`;

-- Dumping structure for table u353443769_beis.dt_abonaments
CREATE TABLE IF NOT EXISTS `dt_abonaments` (
  `id` int(10) unsigned NOT NULL,
  `datums_no` date DEFAULT NULL,
  `datums_lidz` date DEFAULT NULL,
  `persona_id` int(10) unsigned NOT NULL,
  `cena_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `persona_key` (`persona_id`),
  KEY `cena_key` (`cena_id`),
  CONSTRAINT `cena_key` FOREIGN KEY (`cena_id`) REFERENCES `dt_cena` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `persona_key` FOREIGN KEY (`persona_id`) REFERENCES `dt_persona` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;

-- Dumping data for table u353443769_beis.dt_abonaments: ~0 rows (approximately)

-- Dumping structure for table u353443769_beis.dt_atlaides
CREATE TABLE IF NOT EXISTS `dt_atlaides` (
  `id` int(11) unsigned NOT NULL,
  `atlaide` int(11) NOT NULL,
  `iemesls` text NOT NULL,
  `datums_no` date NOT NULL,
  `datums_lidz` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;

-- Dumping data for table u353443769_beis.dt_atlaides: ~1 rows (approximately)
INSERT INTO `dt_atlaides` (`id`, `atlaide`, `iemesls`, `datums_no`, `datums_lidz`) VALUES
	(1, 10, 'Pavasaris', '2024-02-28', '2024-03-28');

-- Dumping structure for table u353443769_beis.dt_cena
CREATE TABLE IF NOT EXISTS `dt_cena` (
  `id` int(10) unsigned NOT NULL,
  `cena` double NOT NULL DEFAULT 0,
  `pakalpojumi_id` int(11) unsigned NOT NULL,
  `vecuma_grupa_id` int(11) unsigned NOT NULL,
  `atlaides_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `pakalpojumi_key` (`pakalpojumi_id`),
  KEY `vecuma_grupa_key` (`vecuma_grupa_id`),
  KEY `atlaides_key` (`atlaides_id`),
  CONSTRAINT `atlaides_key` FOREIGN KEY (`atlaides_id`) REFERENCES `dt_atlaides` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `pakalpojumi_key` FOREIGN KEY (`pakalpojumi_id`) REFERENCES `dt_pakalpojumi` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `vecuma_grupa_key` FOREIGN KEY (`vecuma_grupa_id`) REFERENCES `dt_vecuma_grupa` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;

-- Dumping data for table u353443769_beis.dt_cena: ~0 rows (approximately)

-- Dumping structure for table u353443769_beis.dt_pakalpojumi
CREATE TABLE IF NOT EXISTS `dt_pakalpojumi` (
  `id` int(10) unsigned NOT NULL,
  `spa` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `tennisa_laukums` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `aerobikas_zale` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `meditacijas` tinyint(3) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;

-- Dumping data for table u353443769_beis.dt_pakalpojumi: ~2 rows (approximately)
INSERT INTO `dt_pakalpojumi` (`id`, `spa`, `tennisa_laukums`, `aerobikas_zale`, `meditacijas`) VALUES
	(1, 1, 1, 1, 1),
	(2, 1, 0, 1, 0);

-- Dumping structure for table u353443769_beis.dt_persona
CREATE TABLE IF NOT EXISTS `dt_persona` (
  `id` int(10) unsigned NOT NULL,
  `vecums` int(11) NOT NULL,
  `vards` varchar(50) NOT NULL DEFAULT '',
  `uzvards_id` int(11) unsigned NOT NULL DEFAULT 0,
  `dzimums` int(11) NOT NULL DEFAULT 0,
  `aizbildnis` int(11) NOT NULL DEFAULT 0,
  `tel_nummurs` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `uzvards_key` (`uzvards_id`),
  CONSTRAINT `uzvards_key` FOREIGN KEY (`uzvards_id`) REFERENCES `dt_uzvards` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;

-- Dumping data for table u353443769_beis.dt_persona: ~0 rows (approximately)

-- Dumping structure for table u353443769_beis.dt_uzvards
CREATE TABLE IF NOT EXISTS `dt_uzvards` (
  `id` int(10) unsigned NOT NULL,
  `uzvards` varchar(50) NOT NULL DEFAULT '',
  `sekundars` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;

-- Dumping data for table u353443769_beis.dt_uzvards: ~0 rows (approximately)

-- Dumping structure for table u353443769_beis.dt_vecuma_grupa
CREATE TABLE IF NOT EXISTS `dt_vecuma_grupa` (
  `id` int(10) unsigned NOT NULL,
  `nosaukums` varchar(50) NOT NULL DEFAULT '',
  `atlaide` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf32 COLLATE=utf32_unicode_ci;

-- Dumping data for table u353443769_beis.dt_vecuma_grupa: ~0 rows (approximately)

/*!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) */;
