Generic Service

JSON Reference loop
Events
This commit is contained in:
2018-10-07 03:03:38 +02:00
parent 642d533a49
commit 9a9d4c7053
12 changed files with 270 additions and 117 deletions

View File

@@ -1,80 +1,169 @@
-- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64)
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1 Database: ladose
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.16-MariaDB
-- Host: localhost
-- Generation Time: Oct 06, 2018 at 10:12 PM
-- Server version: 5.6.40-log
-- PHP Version: 7.1.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!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 */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Table structure for table `applicationuser`
-- Database: `ladoseapi`
--
DROP TABLE IF EXISTS `applicationuser`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `applicationuser` (
`id` int(11) NOT NULL AUTO_INCREMENT,
-- --------------------------------------------------------
--
-- Table structure for table `ApplicationUser`
--
CREATE TABLE `ApplicationUser` (
`Id` int(11) NOT NULL,
`FirstName` varchar(45) DEFAULT NULL,
`LastName` varchar(45) DEFAULT NULL,
`Username` varchar(45) DEFAULT NULL,
`UserName` varchar(45) DEFAULT NULL,
`PasswordHash` blob,
`PasswordSalt` blob,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `game`
--
DROP TABLE IF EXISTS `game`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `game` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) CHARACTER SET utf8 DEFAULT NULL,
`imgurl` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `saison`
--
DROP TABLE IF EXISTS `saison`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `saison` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) NOT NULL,
`datedebut` datetime NOT NULL,
`datefin` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`)
`PasswordSalt` blob
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
-- --------------------------------------------------------
--
-- Table structure for table `user`
-- Table structure for table `Event`
--
CREATE TABLE `Event` (
`Id` int(11) NOT NULL,
`Name` varchar(255) NOT NULL,
`Date` datetime NOT NULL,
`SeasonId` int(11) NOT NULL,
`Ranking` tinyint(4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `Game`
--
CREATE TABLE `Game` (
`Id` int(11) NOT NULL,
`Name` varchar(45) CHARACTER SET utf8 DEFAULT NULL,
`ImgUrl` varchar(255) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `Season`
--
CREATE TABLE `Season` (
`Id` int(11) NOT NULL,
`Name` varchar(45) DEFAULT NULL,
`StartDate` datetime DEFAULT NULL,
`EndDate` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `SeasonGame`
--
CREATE TABLE `SeasonGame` (
`SeasonId` int(11) NOT NULL,
`GameId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `ApplicationUser`
--
ALTER TABLE `ApplicationUser`
ADD PRIMARY KEY (`Id`);
--
-- Indexes for table `Event`
--
ALTER TABLE `Event`
ADD PRIMARY KEY (`Id`),
ADD KEY `SeasonPK_idx` (`SeasonId`);
--
-- Indexes for table `Game`
--
ALTER TABLE `Game`
ADD PRIMARY KEY (`Id`),
ADD UNIQUE KEY `name_UNIQUE` (`Name`);
--
-- Indexes for table `Season`
--
ALTER TABLE `Season`
ADD PRIMARY KEY (`Id`),
ADD UNIQUE KEY `Name_UNIQUE` (`Name`);
--
-- Indexes for table `SeasonGame`
--
ALTER TABLE `SeasonGame`
ADD PRIMARY KEY (`SeasonId`,`GameId`),
ADD KEY `GamePK_idx` (`GameId`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `ApplicationUser`
--
ALTER TABLE `ApplicationUser`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `Event`
--
ALTER TABLE `Event`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `Game`
--
ALTER TABLE `Game`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `Season`
--
ALTER TABLE `Season`
MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `Event`
--
ALTER TABLE `Event`
ADD CONSTRAINT `SeasonsPK` FOREIGN KEY (`SeasonId`) REFERENCES `Season` (`Id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
--
-- Constraints for table `SeasonGame`
--
ALTER TABLE `SeasonGame`
ADD CONSTRAINT `GamePK` FOREIGN KEY (`GameId`) REFERENCES `Game` (`Id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
ADD CONSTRAINT `SeasonPK` FOREIGN KEY (`SeasonId`) REFERENCES `Season` (`Id`) ON DELETE NO ACTION ON UPDATE NO ACTION;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;