﻿CREATE TABLE [dbo].[Colleges]
(
	[Id] INT IDENTITY(1,1) NOT NULL PRIMARY KEY,
    [Annee_Id] int  NOT NULL,
	[CodeRne] NVARCHAR(10) NOT NULL, 
	[Libelle] NVARCHAR(255) NOT NULL,
	[Adresse] NVARCHAR(255) NULL, 
	[Code_Postal] NVARCHAR(5) NULL, 
    [TypeCollege_Id] INT NOT NULL, 
	[Commune_Insee] NVARCHAR(5) NULL, 
	[Commune] NVARCHAR(255) NOT NULL, 
    [Canton] NVARCHAR(255) NULL, 
    [Territoire_Id] NVARCHAR(10) NULL,
    [TAD] NVARCHAR(255) NULL, 
    [CDC] NVARCHAR(255) NULL, 
	[Tel] NVARCHAR(255) NULL,
	[Fax] NVARCHAR(255) NULL,
	[Email] NVARCHAR(255) NULL,
    CONSTRAINT [FK_Colleges_TypesCollege] FOREIGN KEY ([TypeCollege_Id]) REFERENCES [TypesCollege]([Id]), 
    CONSTRAINT [FK_Colleges_Territoires] FOREIGN KEY ([Territoire_Id]) REFERENCES [Territoires]([Id]),
    CONSTRAINT [FK_Annees_Colleges] FOREIGN KEY ([Annee_Id]) REFERENCES [Annees]([Id])
)
