123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296 |
- <?xml version="1.0" encoding="utf-8"?>
- <Schema Namespace="Хранилище rewqModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
- <EntityType Name="Aircrafts">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" Nullable="false" />
- <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
- <Property Name="MakeModel" Type="nvarchar" MaxLength="10" />
- <Property Name="TotalSeats" Type="int" Nullable="false" />
- <Property Name="EconomySeats" Type="int" Nullable="false" />
- <Property Name="BusinessSeats" Type="int" Nullable="false" />
- </EntityType>
- <EntityType Name="Airports">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
- <Property Name="CountryID" Type="int" Nullable="false" />
- <Property Name="IATACode" Type="varchar" MaxLength="3" Nullable="false" />
- <Property Name="Name" Type="nvarchar" MaxLength="50" />
- </EntityType>
- <EntityType Name="CabinTypes">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
- <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
- </EntityType>
- <EntityType Name="Countries">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
- <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
- </EntityType>
- <EntityType Name="Offices">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
- <Property Name="CountryID" Type="int" Nullable="false" />
- <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
- <Property Name="Phone" Type="nvarchar" MaxLength="50" Nullable="false" />
- <Property Name="Contact" Type="nvarchar" MaxLength="250" Nullable="false" />
- </EntityType>
- <EntityType Name="Roles">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" Nullable="false" />
- <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
- </EntityType>
- <EntityType Name="Routes">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
- <Property Name="DepartureAirportID" Type="int" Nullable="false" />
- <Property Name="ArrivalAirportID" Type="int" Nullable="false" />
- <Property Name="Distance" Type="int" Nullable="false" />
- <Property Name="FlightTime" Type="int" Nullable="false" />
- </EntityType>
- <EntityType Name="Schedules">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
- <Property Name="Date" Type="date" Nullable="false" />
- <Property Name="Time" Type="time" Precision="5" Nullable="false" />
- <Property Name="AircraftID" Type="int" Nullable="false" />
- <Property Name="RouteID" Type="int" Nullable="false" />
- <Property Name="EconomyPrice" Type="money" Nullable="false" />
- <Property Name="Confirmed" Type="bit" Nullable="false" />
- <Property Name="FlightNumber" Type="nvarchar" MaxLength="10" />
- </EntityType>
- <EntityType Name="Tickets">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
- <Property Name="UserID" Type="int" Nullable="false" />
- <Property Name="ScheduleID" Type="int" Nullable="false" />
- <Property Name="CabinTypeID" Type="int" Nullable="false" />
- <Property Name="Firstname" Type="nvarchar" MaxLength="50" Nullable="false" />
- <Property Name="Lastname" Type="nvarchar" MaxLength="50" Nullable="false" />
- <Property Name="Email" Type="nvarchar" MaxLength="50" />
- <Property Name="Phone" Type="nvarchar" MaxLength="14" Nullable="false" />
- <Property Name="PassportNumber" Type="nvarchar" MaxLength="9" Nullable="false" />
- <Property Name="PassportCountryID" Type="int" Nullable="false" />
- <Property Name="BookingReference" Type="nvarchar" MaxLength="6" Nullable="false" />
- <Property Name="Confirmed" Type="bit" Nullable="false" />
- </EntityType>
- <EntityType Name="Users">
- <Key>
- <PropertyRef Name="ID" />
- </Key>
- <Property Name="ID" Type="int" Nullable="false" />
- <Property Name="RoleID" Type="int" Nullable="false" />
- <Property Name="Email" Type="nvarchar" MaxLength="150" Nullable="false" />
- <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
- <Property Name="FirstName" Type="nvarchar" MaxLength="50" />
- <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
- <Property Name="OfficeID" Type="int" />
- <Property Name="Birthdate" Type="date" />
- <Property Name="Active" Type="bit" />
- </EntityType>
- <Association Name="FK_AirPort_Country">
- <End Role="Countries" Type="Self.Countries" Multiplicity="1" />
- <End Role="Airports" Type="Self.Airports" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Countries">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Airports">
- <PropertyRef Name="CountryID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Office_Country">
- <End Role="Countries" Type="Self.Countries" Multiplicity="1" />
- <End Role="Offices" Type="Self.Offices" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Countries">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Offices">
- <PropertyRef Name="CountryID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Routes_Airports2">
- <End Role="Airports" Type="Self.Airports" Multiplicity="1" />
- <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Airports">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Routes">
- <PropertyRef Name="DepartureAirportID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Routes_Airports3">
- <End Role="Airports" Type="Self.Airports" Multiplicity="1" />
- <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Airports">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Routes">
- <PropertyRef Name="ArrivalAirportID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Schedule_AirCraft">
- <End Role="Aircrafts" Type="Self.Aircrafts" Multiplicity="1" />
- <End Role="Schedules" Type="Self.Schedules" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Aircrafts">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Schedules">
- <PropertyRef Name="AircraftID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Schedule_Routes">
- <End Role="Routes" Type="Self.Routes" Multiplicity="1" />
- <End Role="Schedules" Type="Self.Schedules" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Routes">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Schedules">
- <PropertyRef Name="RouteID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Ticket_Schedule">
- <End Role="Schedules" Type="Self.Schedules" Multiplicity="1" />
- <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Schedules">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Tickets">
- <PropertyRef Name="ScheduleID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Ticket_TravelClass">
- <End Role="CabinTypes" Type="Self.CabinTypes" Multiplicity="1" />
- <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="CabinTypes">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Tickets">
- <PropertyRef Name="CabinTypeID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Ticket_User">
- <End Role="Users" Type="Self.Users" Multiplicity="1" />
- <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Users">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Tickets">
- <PropertyRef Name="UserID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Users_Offices">
- <End Role="Offices" Type="Self.Offices" Multiplicity="0..1" />
- <End Role="Users" Type="Self.Users" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Offices">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Users">
- <PropertyRef Name="OfficeID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <Association Name="FK_Users_Roles">
- <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
- <End Role="Users" Type="Self.Users" Multiplicity="*" />
- <ReferentialConstraint>
- <Principal Role="Roles">
- <PropertyRef Name="ID" />
- </Principal>
- <Dependent Role="Users">
- <PropertyRef Name="RoleID" />
- </Dependent>
- </ReferentialConstraint>
- </Association>
- <EntityContainer Name="Хранилище rewqModelContainer">
- <EntitySet Name="Aircrafts" EntityType="Self.Aircrafts" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="Airports" EntityType="Self.Airports" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="CabinTypes" EntityType="Self.CabinTypes" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="Countries" EntityType="Self.Countries" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="Offices" EntityType="Self.Offices" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="Roles" EntityType="Self.Roles" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="Routes" EntityType="Self.Routes" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="Schedules" EntityType="Self.Schedules" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="Tickets" EntityType="Self.Tickets" Schema="dbo" store:Type="Tables" />
- <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
- <AssociationSet Name="FK_AirPort_Country" Association="Self.FK_AirPort_Country">
- <End Role="Countries" EntitySet="Countries" />
- <End Role="Airports" EntitySet="Airports" />
- </AssociationSet>
- <AssociationSet Name="FK_Office_Country" Association="Self.FK_Office_Country">
- <End Role="Countries" EntitySet="Countries" />
- <End Role="Offices" EntitySet="Offices" />
- </AssociationSet>
- <AssociationSet Name="FK_Routes_Airports2" Association="Self.FK_Routes_Airports2">
- <End Role="Airports" EntitySet="Airports" />
- <End Role="Routes" EntitySet="Routes" />
- </AssociationSet>
- <AssociationSet Name="FK_Routes_Airports3" Association="Self.FK_Routes_Airports3">
- <End Role="Airports" EntitySet="Airports" />
- <End Role="Routes" EntitySet="Routes" />
- </AssociationSet>
- <AssociationSet Name="FK_Schedule_AirCraft" Association="Self.FK_Schedule_AirCraft">
- <End Role="Aircrafts" EntitySet="Aircrafts" />
- <End Role="Schedules" EntitySet="Schedules" />
- </AssociationSet>
- <AssociationSet Name="FK_Schedule_Routes" Association="Self.FK_Schedule_Routes">
- <End Role="Routes" EntitySet="Routes" />
- <End Role="Schedules" EntitySet="Schedules" />
- </AssociationSet>
- <AssociationSet Name="FK_Ticket_Schedule" Association="Self.FK_Ticket_Schedule">
- <End Role="Schedules" EntitySet="Schedules" />
- <End Role="Tickets" EntitySet="Tickets" />
- </AssociationSet>
- <AssociationSet Name="FK_Ticket_TravelClass" Association="Self.FK_Ticket_TravelClass">
- <End Role="CabinTypes" EntitySet="CabinTypes" />
- <End Role="Tickets" EntitySet="Tickets" />
- </AssociationSet>
- <AssociationSet Name="FK_Ticket_User" Association="Self.FK_Ticket_User">
- <End Role="Users" EntitySet="Users" />
- <End Role="Tickets" EntitySet="Tickets" />
- </AssociationSet>
- <AssociationSet Name="FK_Users_Offices" Association="Self.FK_Users_Offices">
- <End Role="Offices" EntitySet="Offices" />
- <End Role="Users" EntitySet="Users" />
- </AssociationSet>
- <AssociationSet Name="FK_Users_Roles" Association="Self.FK_Users_Roles">
- <End Role="Roles" EntitySet="Roles" />
- <End Role="Users" EntitySet="Users" />
- </AssociationSet>
- </EntityContainer>
- </Schema>
|