ADO.edmx 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  3. <!-- EF Runtime content -->
  4. <edmx:Runtime>
  5. <!-- SSDL content -->
  6. <edmx:StorageModels>
  7. <Schema Namespace="Хранилище Session3_4Model" 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">
  8. <EntityType Name="Aircrafts">
  9. <Key>
  10. <PropertyRef Name="ID" />
  11. </Key>
  12. <Property Name="ID" Type="int" Nullable="false" />
  13. <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  14. <Property Name="MakeModel" Type="nvarchar" MaxLength="10" />
  15. <Property Name="TotalSeats" Type="int" Nullable="false" />
  16. <Property Name="EconomySeats" Type="int" Nullable="false" />
  17. <Property Name="BusinessSeats" Type="int" Nullable="false" />
  18. </EntityType>
  19. <EntityType Name="Airports">
  20. <Key>
  21. <PropertyRef Name="ID" />
  22. </Key>
  23. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  24. <Property Name="CountryID" Type="int" Nullable="false" />
  25. <Property Name="IATACode" Type="varchar" MaxLength="3" Nullable="false" />
  26. <Property Name="Name" Type="nvarchar" MaxLength="50" />
  27. </EntityType>
  28. <EntityType Name="CabinTypes">
  29. <Key>
  30. <PropertyRef Name="ID" />
  31. </Key>
  32. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  33. <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  34. </EntityType>
  35. <EntityType Name="Countries">
  36. <Key>
  37. <PropertyRef Name="ID" />
  38. </Key>
  39. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  40. <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  41. </EntityType>
  42. <EntityType Name="Offices">
  43. <Key>
  44. <PropertyRef Name="ID" />
  45. </Key>
  46. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  47. <Property Name="CountryID" Type="int" Nullable="false" />
  48. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  49. <Property Name="Phone" Type="nvarchar" MaxLength="50" Nullable="false" />
  50. <Property Name="Contact" Type="nvarchar" MaxLength="250" Nullable="false" />
  51. </EntityType>
  52. <EntityType Name="Roles">
  53. <Key>
  54. <PropertyRef Name="ID" />
  55. </Key>
  56. <Property Name="ID" Type="int" Nullable="false" />
  57. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  58. </EntityType>
  59. <EntityType Name="Routes">
  60. <Key>
  61. <PropertyRef Name="ID" />
  62. </Key>
  63. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  64. <Property Name="DepartureAirportID" Type="int" Nullable="false" />
  65. <Property Name="ArrivalAirportID" Type="int" Nullable="false" />
  66. <Property Name="Distance" Type="int" Nullable="false" />
  67. <Property Name="FlightTime" Type="int" Nullable="false" />
  68. </EntityType>
  69. <EntityType Name="Schedules">
  70. <Key>
  71. <PropertyRef Name="ID" />
  72. </Key>
  73. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  74. <Property Name="Date" Type="date" Nullable="false" />
  75. <Property Name="Time" Type="time" Precision="5" Nullable="false" />
  76. <Property Name="AircraftID" Type="int" Nullable="false" />
  77. <Property Name="RouteID" Type="int" Nullable="false" />
  78. <Property Name="EconomyPrice" Type="money" Nullable="false" />
  79. <Property Name="Confirmed" Type="bit" Nullable="false" />
  80. <Property Name="FlightNumber" Type="nvarchar" MaxLength="10" />
  81. </EntityType>
  82. <EntityType Name="Tickets">
  83. <Key>
  84. <PropertyRef Name="ID" />
  85. </Key>
  86. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  87. <Property Name="UserID" Type="int" Nullable="false" />
  88. <Property Name="ScheduleID" Type="int" Nullable="false" />
  89. <Property Name="CabinTypeID" Type="int" Nullable="false" />
  90. <Property Name="Firstname" Type="nvarchar" MaxLength="50" Nullable="false" />
  91. <Property Name="Lastname" Type="nvarchar" MaxLength="50" Nullable="false" />
  92. <Property Name="Email" Type="nvarchar" MaxLength="50" />
  93. <Property Name="Phone" Type="nvarchar" MaxLength="14" Nullable="false" />
  94. <Property Name="PassportNumber" Type="nvarchar" MaxLength="9" Nullable="false" />
  95. <Property Name="PassportCountryID" Type="int" Nullable="false" />
  96. <Property Name="BookingReference" Type="nvarchar" MaxLength="6" Nullable="false" />
  97. <Property Name="Confirmed" Type="bit" Nullable="false" />
  98. </EntityType>
  99. <EntityType Name="Users">
  100. <Key>
  101. <PropertyRef Name="ID" />
  102. </Key>
  103. <Property Name="ID" Type="int" Nullable="false" />
  104. <Property Name="RoleID" Type="int" Nullable="false" />
  105. <Property Name="Email" Type="nvarchar" MaxLength="150" Nullable="false" />
  106. <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
  107. <Property Name="FirstName" Type="nvarchar" MaxLength="50" />
  108. <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
  109. <Property Name="OfficeID" Type="int" />
  110. <Property Name="Birthdate" Type="date" />
  111. <Property Name="Active" Type="bit" />
  112. </EntityType>
  113. <Association Name="FK_AirPort_Country">
  114. <End Role="Countries" Type="Self.Countries" Multiplicity="1" />
  115. <End Role="Airports" Type="Self.Airports" Multiplicity="*" />
  116. <ReferentialConstraint>
  117. <Principal Role="Countries">
  118. <PropertyRef Name="ID" />
  119. </Principal>
  120. <Dependent Role="Airports">
  121. <PropertyRef Name="CountryID" />
  122. </Dependent>
  123. </ReferentialConstraint>
  124. </Association>
  125. <Association Name="FK_Office_Country">
  126. <End Role="Countries" Type="Self.Countries" Multiplicity="1" />
  127. <End Role="Offices" Type="Self.Offices" Multiplicity="*" />
  128. <ReferentialConstraint>
  129. <Principal Role="Countries">
  130. <PropertyRef Name="ID" />
  131. </Principal>
  132. <Dependent Role="Offices">
  133. <PropertyRef Name="CountryID" />
  134. </Dependent>
  135. </ReferentialConstraint>
  136. </Association>
  137. <Association Name="FK_Routes_Airports2">
  138. <End Role="Airports" Type="Self.Airports" Multiplicity="1" />
  139. <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
  140. <ReferentialConstraint>
  141. <Principal Role="Airports">
  142. <PropertyRef Name="ID" />
  143. </Principal>
  144. <Dependent Role="Routes">
  145. <PropertyRef Name="DepartureAirportID" />
  146. </Dependent>
  147. </ReferentialConstraint>
  148. </Association>
  149. <Association Name="FK_Routes_Airports3">
  150. <End Role="Airports" Type="Self.Airports" Multiplicity="1" />
  151. <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
  152. <ReferentialConstraint>
  153. <Principal Role="Airports">
  154. <PropertyRef Name="ID" />
  155. </Principal>
  156. <Dependent Role="Routes">
  157. <PropertyRef Name="ArrivalAirportID" />
  158. </Dependent>
  159. </ReferentialConstraint>
  160. </Association>
  161. <Association Name="FK_Schedule_AirCraft">
  162. <End Role="Aircrafts" Type="Self.Aircrafts" Multiplicity="1" />
  163. <End Role="Schedules" Type="Self.Schedules" Multiplicity="*" />
  164. <ReferentialConstraint>
  165. <Principal Role="Aircrafts">
  166. <PropertyRef Name="ID" />
  167. </Principal>
  168. <Dependent Role="Schedules">
  169. <PropertyRef Name="AircraftID" />
  170. </Dependent>
  171. </ReferentialConstraint>
  172. </Association>
  173. <Association Name="FK_Schedule_Routes">
  174. <End Role="Routes" Type="Self.Routes" Multiplicity="1" />
  175. <End Role="Schedules" Type="Self.Schedules" Multiplicity="*" />
  176. <ReferentialConstraint>
  177. <Principal Role="Routes">
  178. <PropertyRef Name="ID" />
  179. </Principal>
  180. <Dependent Role="Schedules">
  181. <PropertyRef Name="RouteID" />
  182. </Dependent>
  183. </ReferentialConstraint>
  184. </Association>
  185. <Association Name="FK_Ticket_Schedule">
  186. <End Role="Schedules" Type="Self.Schedules" Multiplicity="1" />
  187. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  188. <ReferentialConstraint>
  189. <Principal Role="Schedules">
  190. <PropertyRef Name="ID" />
  191. </Principal>
  192. <Dependent Role="Tickets">
  193. <PropertyRef Name="ScheduleID" />
  194. </Dependent>
  195. </ReferentialConstraint>
  196. </Association>
  197. <Association Name="FK_Ticket_TravelClass">
  198. <End Role="CabinTypes" Type="Self.CabinTypes" Multiplicity="1" />
  199. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  200. <ReferentialConstraint>
  201. <Principal Role="CabinTypes">
  202. <PropertyRef Name="ID" />
  203. </Principal>
  204. <Dependent Role="Tickets">
  205. <PropertyRef Name="CabinTypeID" />
  206. </Dependent>
  207. </ReferentialConstraint>
  208. </Association>
  209. <Association Name="FK_Ticket_User">
  210. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  211. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  212. <ReferentialConstraint>
  213. <Principal Role="Users">
  214. <PropertyRef Name="ID" />
  215. </Principal>
  216. <Dependent Role="Tickets">
  217. <PropertyRef Name="UserID" />
  218. </Dependent>
  219. </ReferentialConstraint>
  220. </Association>
  221. <Association Name="FK_Users_Offices">
  222. <End Role="Offices" Type="Self.Offices" Multiplicity="0..1" />
  223. <End Role="Users" Type="Self.Users" Multiplicity="*" />
  224. <ReferentialConstraint>
  225. <Principal Role="Offices">
  226. <PropertyRef Name="ID" />
  227. </Principal>
  228. <Dependent Role="Users">
  229. <PropertyRef Name="OfficeID" />
  230. </Dependent>
  231. </ReferentialConstraint>
  232. </Association>
  233. <Association Name="FK_Users_Roles">
  234. <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
  235. <End Role="Users" Type="Self.Users" Multiplicity="*" />
  236. <ReferentialConstraint>
  237. <Principal Role="Roles">
  238. <PropertyRef Name="ID" />
  239. </Principal>
  240. <Dependent Role="Users">
  241. <PropertyRef Name="RoleID" />
  242. </Dependent>
  243. </ReferentialConstraint>
  244. </Association>
  245. <EntityContainer Name="Хранилище Session3_4ModelContainer">
  246. <EntitySet Name="Aircrafts" EntityType="Self.Aircrafts" Schema="dbo" store:Type="Tables" />
  247. <EntitySet Name="Airports" EntityType="Self.Airports" Schema="dbo" store:Type="Tables" />
  248. <EntitySet Name="CabinTypes" EntityType="Self.CabinTypes" Schema="dbo" store:Type="Tables" />
  249. <EntitySet Name="Countries" EntityType="Self.Countries" Schema="dbo" store:Type="Tables" />
  250. <EntitySet Name="Offices" EntityType="Self.Offices" Schema="dbo" store:Type="Tables" />
  251. <EntitySet Name="Roles" EntityType="Self.Roles" Schema="dbo" store:Type="Tables" />
  252. <EntitySet Name="Routes" EntityType="Self.Routes" Schema="dbo" store:Type="Tables" />
  253. <EntitySet Name="Schedules" EntityType="Self.Schedules" Schema="dbo" store:Type="Tables" />
  254. <EntitySet Name="Tickets" EntityType="Self.Tickets" Schema="dbo" store:Type="Tables" />
  255. <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
  256. <AssociationSet Name="FK_AirPort_Country" Association="Self.FK_AirPort_Country">
  257. <End Role="Countries" EntitySet="Countries" />
  258. <End Role="Airports" EntitySet="Airports" />
  259. </AssociationSet>
  260. <AssociationSet Name="FK_Office_Country" Association="Self.FK_Office_Country">
  261. <End Role="Countries" EntitySet="Countries" />
  262. <End Role="Offices" EntitySet="Offices" />
  263. </AssociationSet>
  264. <AssociationSet Name="FK_Routes_Airports2" Association="Self.FK_Routes_Airports2">
  265. <End Role="Airports" EntitySet="Airports" />
  266. <End Role="Routes" EntitySet="Routes" />
  267. </AssociationSet>
  268. <AssociationSet Name="FK_Routes_Airports3" Association="Self.FK_Routes_Airports3">
  269. <End Role="Airports" EntitySet="Airports" />
  270. <End Role="Routes" EntitySet="Routes" />
  271. </AssociationSet>
  272. <AssociationSet Name="FK_Schedule_AirCraft" Association="Self.FK_Schedule_AirCraft">
  273. <End Role="Aircrafts" EntitySet="Aircrafts" />
  274. <End Role="Schedules" EntitySet="Schedules" />
  275. </AssociationSet>
  276. <AssociationSet Name="FK_Schedule_Routes" Association="Self.FK_Schedule_Routes">
  277. <End Role="Routes" EntitySet="Routes" />
  278. <End Role="Schedules" EntitySet="Schedules" />
  279. </AssociationSet>
  280. <AssociationSet Name="FK_Ticket_Schedule" Association="Self.FK_Ticket_Schedule">
  281. <End Role="Schedules" EntitySet="Schedules" />
  282. <End Role="Tickets" EntitySet="Tickets" />
  283. </AssociationSet>
  284. <AssociationSet Name="FK_Ticket_TravelClass" Association="Self.FK_Ticket_TravelClass">
  285. <End Role="CabinTypes" EntitySet="CabinTypes" />
  286. <End Role="Tickets" EntitySet="Tickets" />
  287. </AssociationSet>
  288. <AssociationSet Name="FK_Ticket_User" Association="Self.FK_Ticket_User">
  289. <End Role="Users" EntitySet="Users" />
  290. <End Role="Tickets" EntitySet="Tickets" />
  291. </AssociationSet>
  292. <AssociationSet Name="FK_Users_Offices" Association="Self.FK_Users_Offices">
  293. <End Role="Offices" EntitySet="Offices" />
  294. <End Role="Users" EntitySet="Users" />
  295. </AssociationSet>
  296. <AssociationSet Name="FK_Users_Roles" Association="Self.FK_Users_Roles">
  297. <End Role="Roles" EntitySet="Roles" />
  298. <End Role="Users" EntitySet="Users" />
  299. </AssociationSet>
  300. </EntityContainer>
  301. </Schema>
  302. </edmx:StorageModels>
  303. <!-- CSDL content -->
  304. <edmx:ConceptualModels>
  305. <Schema Namespace="Session3_4Model" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
  306. <EntityType Name="Aircrafts">
  307. <Key>
  308. <PropertyRef Name="ID" />
  309. </Key>
  310. <Property Name="ID" Type="Int32" Nullable="false" />
  311. <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  312. <Property Name="MakeModel" Type="String" MaxLength="10" FixedLength="false" Unicode="true" />
  313. <Property Name="TotalSeats" Type="Int32" Nullable="false" />
  314. <Property Name="EconomySeats" Type="Int32" Nullable="false" />
  315. <Property Name="BusinessSeats" Type="Int32" Nullable="false" />
  316. <NavigationProperty Name="Schedules" Relationship="Self.FK_Schedule_AirCraft" FromRole="Aircrafts" ToRole="Schedules" />
  317. </EntityType>
  318. <EntityType Name="Airports">
  319. <Key>
  320. <PropertyRef Name="ID" />
  321. </Key>
  322. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  323. <Property Name="CountryID" Type="Int32" Nullable="false" />
  324. <Property Name="IATACode" Type="String" MaxLength="3" FixedLength="false" Unicode="false" Nullable="false" />
  325. <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  326. <NavigationProperty Name="Countries" Relationship="Self.FK_AirPort_Country" FromRole="Airports" ToRole="Countries" />
  327. <NavigationProperty Name="Routes" Relationship="Self.FK_Routes_Airports2" FromRole="Airports" ToRole="Routes" />
  328. <NavigationProperty Name="Routes1" Relationship="Self.FK_Routes_Airports3" FromRole="Airports" ToRole="Routes" />
  329. </EntityType>
  330. <EntityType Name="CabinTypes">
  331. <Key>
  332. <PropertyRef Name="ID" />
  333. </Key>
  334. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  335. <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  336. <NavigationProperty Name="Tickets" Relationship="Self.FK_Ticket_TravelClass" FromRole="CabinTypes" ToRole="Tickets" />
  337. </EntityType>
  338. <EntityType Name="Countries">
  339. <Key>
  340. <PropertyRef Name="ID" />
  341. </Key>
  342. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  343. <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  344. <NavigationProperty Name="Airports" Relationship="Self.FK_AirPort_Country" FromRole="Countries" ToRole="Airports" />
  345. <NavigationProperty Name="Offices" Relationship="Self.FK_Office_Country" FromRole="Countries" ToRole="Offices" />
  346. </EntityType>
  347. <EntityType Name="Offices">
  348. <Key>
  349. <PropertyRef Name="ID" />
  350. </Key>
  351. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  352. <Property Name="CountryID" Type="Int32" Nullable="false" />
  353. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  354. <Property Name="Phone" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  355. <Property Name="Contact" Type="String" MaxLength="250" FixedLength="false" Unicode="true" Nullable="false" />
  356. <NavigationProperty Name="Countries" Relationship="Self.FK_Office_Country" FromRole="Offices" ToRole="Countries" />
  357. <NavigationProperty Name="Users" Relationship="Self.FK_Users_Offices" FromRole="Offices" ToRole="Users" />
  358. </EntityType>
  359. <EntityType Name="Roles">
  360. <Key>
  361. <PropertyRef Name="ID" />
  362. </Key>
  363. <Property Name="ID" Type="Int32" Nullable="false" />
  364. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  365. <NavigationProperty Name="Users" Relationship="Self.FK_Users_Roles" FromRole="Roles" ToRole="Users" />
  366. </EntityType>
  367. <EntityType Name="Routes">
  368. <Key>
  369. <PropertyRef Name="ID" />
  370. </Key>
  371. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  372. <Property Name="DepartureAirportID" Type="Int32" Nullable="false" />
  373. <Property Name="ArrivalAirportID" Type="Int32" Nullable="false" />
  374. <Property Name="Distance" Type="Int32" Nullable="false" />
  375. <Property Name="FlightTime" Type="Int32" Nullable="false" />
  376. <NavigationProperty Name="Airports" Relationship="Self.FK_Routes_Airports2" FromRole="Routes" ToRole="Airports" />
  377. <NavigationProperty Name="Airports1" Relationship="Self.FK_Routes_Airports3" FromRole="Routes" ToRole="Airports" />
  378. <NavigationProperty Name="Schedules" Relationship="Self.FK_Schedule_Routes" FromRole="Routes" ToRole="Schedules" />
  379. </EntityType>
  380. <EntityType Name="Schedules">
  381. <Key>
  382. <PropertyRef Name="ID" />
  383. </Key>
  384. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  385. <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
  386. <Property Name="Time" Type="Time" Nullable="false" Precision="5" />
  387. <Property Name="AircraftID" Type="Int32" Nullable="false" />
  388. <Property Name="RouteID" Type="Int32" Nullable="false" />
  389. <Property Name="EconomyPrice" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  390. <Property Name="Confirmed" Type="Boolean" Nullable="false" />
  391. <Property Name="FlightNumber" Type="String" MaxLength="10" FixedLength="false" Unicode="true" />
  392. <NavigationProperty Name="Aircrafts" Relationship="Self.FK_Schedule_AirCraft" FromRole="Schedules" ToRole="Aircrafts" />
  393. <NavigationProperty Name="Routes" Relationship="Self.FK_Schedule_Routes" FromRole="Schedules" ToRole="Routes" />
  394. <NavigationProperty Name="Tickets" Relationship="Self.FK_Ticket_Schedule" FromRole="Schedules" ToRole="Tickets" />
  395. </EntityType>
  396. <EntityType Name="Tickets">
  397. <Key>
  398. <PropertyRef Name="ID" />
  399. </Key>
  400. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  401. <Property Name="UserID" Type="Int32" Nullable="false" />
  402. <Property Name="ScheduleID" Type="Int32" Nullable="false" />
  403. <Property Name="CabinTypeID" Type="Int32" Nullable="false" />
  404. <Property Name="Firstname" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  405. <Property Name="Lastname" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  406. <Property Name="Email" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  407. <Property Name="Phone" Type="String" MaxLength="14" FixedLength="false" Unicode="true" Nullable="false" />
  408. <Property Name="PassportNumber" Type="String" MaxLength="9" FixedLength="false" Unicode="true" Nullable="false" />
  409. <Property Name="PassportCountryID" Type="Int32" Nullable="false" />
  410. <Property Name="BookingReference" Type="String" MaxLength="6" FixedLength="false" Unicode="true" Nullable="false" />
  411. <Property Name="Confirmed" Type="Boolean" Nullable="false" />
  412. <NavigationProperty Name="CabinTypes" Relationship="Self.FK_Ticket_TravelClass" FromRole="Tickets" ToRole="CabinTypes" />
  413. <NavigationProperty Name="Schedules" Relationship="Self.FK_Ticket_Schedule" FromRole="Tickets" ToRole="Schedules" />
  414. <NavigationProperty Name="Users" Relationship="Self.FK_Ticket_User" FromRole="Tickets" ToRole="Users" />
  415. </EntityType>
  416. <EntityType Name="Users">
  417. <Key>
  418. <PropertyRef Name="ID" />
  419. </Key>
  420. <Property Name="ID" Type="Int32" Nullable="false" />
  421. <Property Name="RoleID" Type="Int32" Nullable="false" />
  422. <Property Name="Email" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  423. <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  424. <Property Name="FirstName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  425. <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  426. <Property Name="OfficeID" Type="Int32" />
  427. <Property Name="Birthdate" Type="DateTime" Precision="0" />
  428. <Property Name="Active" Type="Boolean" />
  429. <NavigationProperty Name="Offices" Relationship="Self.FK_Users_Offices" FromRole="Users" ToRole="Offices" />
  430. <NavigationProperty Name="Roles" Relationship="Self.FK_Users_Roles" FromRole="Users" ToRole="Roles" />
  431. <NavigationProperty Name="Tickets" Relationship="Self.FK_Ticket_User" FromRole="Users" ToRole="Tickets" />
  432. </EntityType>
  433. <Association Name="FK_Schedule_AirCraft">
  434. <End Role="Aircrafts" Type="Self.Aircrafts" Multiplicity="1" />
  435. <End Role="Schedules" Type="Self.Schedules" Multiplicity="*" />
  436. <ReferentialConstraint>
  437. <Principal Role="Aircrafts">
  438. <PropertyRef Name="ID" />
  439. </Principal>
  440. <Dependent Role="Schedules">
  441. <PropertyRef Name="AircraftID" />
  442. </Dependent>
  443. </ReferentialConstraint>
  444. </Association>
  445. <Association Name="FK_AirPort_Country">
  446. <End Role="Countries" Type="Self.Countries" Multiplicity="1" />
  447. <End Role="Airports" Type="Self.Airports" Multiplicity="*" />
  448. <ReferentialConstraint>
  449. <Principal Role="Countries">
  450. <PropertyRef Name="ID" />
  451. </Principal>
  452. <Dependent Role="Airports">
  453. <PropertyRef Name="CountryID" />
  454. </Dependent>
  455. </ReferentialConstraint>
  456. </Association>
  457. <Association Name="FK_Routes_Airports2">
  458. <End Role="Airports" Type="Self.Airports" Multiplicity="1" />
  459. <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
  460. <ReferentialConstraint>
  461. <Principal Role="Airports">
  462. <PropertyRef Name="ID" />
  463. </Principal>
  464. <Dependent Role="Routes">
  465. <PropertyRef Name="DepartureAirportID" />
  466. </Dependent>
  467. </ReferentialConstraint>
  468. </Association>
  469. <Association Name="FK_Routes_Airports3">
  470. <End Role="Airports" Type="Self.Airports" Multiplicity="1" />
  471. <End Role="Routes" Type="Self.Routes" Multiplicity="*" />
  472. <ReferentialConstraint>
  473. <Principal Role="Airports">
  474. <PropertyRef Name="ID" />
  475. </Principal>
  476. <Dependent Role="Routes">
  477. <PropertyRef Name="ArrivalAirportID" />
  478. </Dependent>
  479. </ReferentialConstraint>
  480. </Association>
  481. <Association Name="FK_Ticket_TravelClass">
  482. <End Role="CabinTypes" Type="Self.CabinTypes" Multiplicity="1" />
  483. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  484. <ReferentialConstraint>
  485. <Principal Role="CabinTypes">
  486. <PropertyRef Name="ID" />
  487. </Principal>
  488. <Dependent Role="Tickets">
  489. <PropertyRef Name="CabinTypeID" />
  490. </Dependent>
  491. </ReferentialConstraint>
  492. </Association>
  493. <Association Name="FK_Office_Country">
  494. <End Role="Countries" Type="Self.Countries" Multiplicity="1" />
  495. <End Role="Offices" Type="Self.Offices" Multiplicity="*" />
  496. <ReferentialConstraint>
  497. <Principal Role="Countries">
  498. <PropertyRef Name="ID" />
  499. </Principal>
  500. <Dependent Role="Offices">
  501. <PropertyRef Name="CountryID" />
  502. </Dependent>
  503. </ReferentialConstraint>
  504. </Association>
  505. <Association Name="FK_Users_Offices">
  506. <End Role="Offices" Type="Self.Offices" Multiplicity="0..1" />
  507. <End Role="Users" Type="Self.Users" Multiplicity="*" />
  508. <ReferentialConstraint>
  509. <Principal Role="Offices">
  510. <PropertyRef Name="ID" />
  511. </Principal>
  512. <Dependent Role="Users">
  513. <PropertyRef Name="OfficeID" />
  514. </Dependent>
  515. </ReferentialConstraint>
  516. </Association>
  517. <Association Name="FK_Users_Roles">
  518. <End Role="Roles" Type="Self.Roles" Multiplicity="1" />
  519. <End Role="Users" Type="Self.Users" Multiplicity="*" />
  520. <ReferentialConstraint>
  521. <Principal Role="Roles">
  522. <PropertyRef Name="ID" />
  523. </Principal>
  524. <Dependent Role="Users">
  525. <PropertyRef Name="RoleID" />
  526. </Dependent>
  527. </ReferentialConstraint>
  528. </Association>
  529. <Association Name="FK_Schedule_Routes">
  530. <End Role="Routes" Type="Self.Routes" Multiplicity="1" />
  531. <End Role="Schedules" Type="Self.Schedules" Multiplicity="*" />
  532. <ReferentialConstraint>
  533. <Principal Role="Routes">
  534. <PropertyRef Name="ID" />
  535. </Principal>
  536. <Dependent Role="Schedules">
  537. <PropertyRef Name="RouteID" />
  538. </Dependent>
  539. </ReferentialConstraint>
  540. </Association>
  541. <Association Name="FK_Ticket_Schedule">
  542. <End Role="Schedules" Type="Self.Schedules" Multiplicity="1" />
  543. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  544. <ReferentialConstraint>
  545. <Principal Role="Schedules">
  546. <PropertyRef Name="ID" />
  547. </Principal>
  548. <Dependent Role="Tickets">
  549. <PropertyRef Name="ScheduleID" />
  550. </Dependent>
  551. </ReferentialConstraint>
  552. </Association>
  553. <Association Name="FK_Ticket_User">
  554. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  555. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  556. <ReferentialConstraint>
  557. <Principal Role="Users">
  558. <PropertyRef Name="ID" />
  559. </Principal>
  560. <Dependent Role="Tickets">
  561. <PropertyRef Name="UserID" />
  562. </Dependent>
  563. </ReferentialConstraint>
  564. </Association>
  565. <EntityContainer Name="Session3_4Entities" annotation:LazyLoadingEnabled="true">
  566. <EntitySet Name="Aircrafts" EntityType="Self.Aircrafts" />
  567. <EntitySet Name="Airports" EntityType="Self.Airports" />
  568. <EntitySet Name="CabinTypes" EntityType="Self.CabinTypes" />
  569. <EntitySet Name="Countries" EntityType="Self.Countries" />
  570. <EntitySet Name="Offices" EntityType="Self.Offices" />
  571. <EntitySet Name="Roles" EntityType="Self.Roles" />
  572. <EntitySet Name="Routes" EntityType="Self.Routes" />
  573. <EntitySet Name="Schedules" EntityType="Self.Schedules" />
  574. <EntitySet Name="Tickets" EntityType="Self.Tickets" />
  575. <EntitySet Name="Users" EntityType="Self.Users" />
  576. <AssociationSet Name="FK_Schedule_AirCraft" Association="Self.FK_Schedule_AirCraft">
  577. <End Role="Aircrafts" EntitySet="Aircrafts" />
  578. <End Role="Schedules" EntitySet="Schedules" />
  579. </AssociationSet>
  580. <AssociationSet Name="FK_AirPort_Country" Association="Self.FK_AirPort_Country">
  581. <End Role="Countries" EntitySet="Countries" />
  582. <End Role="Airports" EntitySet="Airports" />
  583. </AssociationSet>
  584. <AssociationSet Name="FK_Routes_Airports2" Association="Self.FK_Routes_Airports2">
  585. <End Role="Airports" EntitySet="Airports" />
  586. <End Role="Routes" EntitySet="Routes" />
  587. </AssociationSet>
  588. <AssociationSet Name="FK_Routes_Airports3" Association="Self.FK_Routes_Airports3">
  589. <End Role="Airports" EntitySet="Airports" />
  590. <End Role="Routes" EntitySet="Routes" />
  591. </AssociationSet>
  592. <AssociationSet Name="FK_Ticket_TravelClass" Association="Self.FK_Ticket_TravelClass">
  593. <End Role="CabinTypes" EntitySet="CabinTypes" />
  594. <End Role="Tickets" EntitySet="Tickets" />
  595. </AssociationSet>
  596. <AssociationSet Name="FK_Office_Country" Association="Self.FK_Office_Country">
  597. <End Role="Countries" EntitySet="Countries" />
  598. <End Role="Offices" EntitySet="Offices" />
  599. </AssociationSet>
  600. <AssociationSet Name="FK_Users_Offices" Association="Self.FK_Users_Offices">
  601. <End Role="Offices" EntitySet="Offices" />
  602. <End Role="Users" EntitySet="Users" />
  603. </AssociationSet>
  604. <AssociationSet Name="FK_Users_Roles" Association="Self.FK_Users_Roles">
  605. <End Role="Roles" EntitySet="Roles" />
  606. <End Role="Users" EntitySet="Users" />
  607. </AssociationSet>
  608. <AssociationSet Name="FK_Schedule_Routes" Association="Self.FK_Schedule_Routes">
  609. <End Role="Routes" EntitySet="Routes" />
  610. <End Role="Schedules" EntitySet="Schedules" />
  611. </AssociationSet>
  612. <AssociationSet Name="FK_Ticket_Schedule" Association="Self.FK_Ticket_Schedule">
  613. <End Role="Schedules" EntitySet="Schedules" />
  614. <End Role="Tickets" EntitySet="Tickets" />
  615. </AssociationSet>
  616. <AssociationSet Name="FK_Ticket_User" Association="Self.FK_Ticket_User">
  617. <End Role="Users" EntitySet="Users" />
  618. <End Role="Tickets" EntitySet="Tickets" />
  619. </AssociationSet>
  620. </EntityContainer>
  621. </Schema>
  622. </edmx:ConceptualModels>
  623. <!-- C-S mapping content -->
  624. <edmx:Mappings>
  625. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  626. <EntityContainerMapping StorageEntityContainer="Хранилище Session3_4ModelContainer" CdmEntityContainer="Session3_4Entities">
  627. <EntitySetMapping Name="Aircrafts">
  628. <EntityTypeMapping TypeName="Session3_4Model.Aircrafts">
  629. <MappingFragment StoreEntitySet="Aircrafts">
  630. <ScalarProperty Name="ID" ColumnName="ID" />
  631. <ScalarProperty Name="Name" ColumnName="Name" />
  632. <ScalarProperty Name="MakeModel" ColumnName="MakeModel" />
  633. <ScalarProperty Name="TotalSeats" ColumnName="TotalSeats" />
  634. <ScalarProperty Name="EconomySeats" ColumnName="EconomySeats" />
  635. <ScalarProperty Name="BusinessSeats" ColumnName="BusinessSeats" />
  636. </MappingFragment>
  637. </EntityTypeMapping>
  638. </EntitySetMapping>
  639. <EntitySetMapping Name="Airports">
  640. <EntityTypeMapping TypeName="Session3_4Model.Airports">
  641. <MappingFragment StoreEntitySet="Airports">
  642. <ScalarProperty Name="ID" ColumnName="ID" />
  643. <ScalarProperty Name="CountryID" ColumnName="CountryID" />
  644. <ScalarProperty Name="IATACode" ColumnName="IATACode" />
  645. <ScalarProperty Name="Name" ColumnName="Name" />
  646. </MappingFragment>
  647. </EntityTypeMapping>
  648. </EntitySetMapping>
  649. <EntitySetMapping Name="CabinTypes">
  650. <EntityTypeMapping TypeName="Session3_4Model.CabinTypes">
  651. <MappingFragment StoreEntitySet="CabinTypes">
  652. <ScalarProperty Name="ID" ColumnName="ID" />
  653. <ScalarProperty Name="Name" ColumnName="Name" />
  654. </MappingFragment>
  655. </EntityTypeMapping>
  656. </EntitySetMapping>
  657. <EntitySetMapping Name="Countries">
  658. <EntityTypeMapping TypeName="Session3_4Model.Countries">
  659. <MappingFragment StoreEntitySet="Countries">
  660. <ScalarProperty Name="ID" ColumnName="ID" />
  661. <ScalarProperty Name="Name" ColumnName="Name" />
  662. </MappingFragment>
  663. </EntityTypeMapping>
  664. </EntitySetMapping>
  665. <EntitySetMapping Name="Offices">
  666. <EntityTypeMapping TypeName="Session3_4Model.Offices">
  667. <MappingFragment StoreEntitySet="Offices">
  668. <ScalarProperty Name="ID" ColumnName="ID" />
  669. <ScalarProperty Name="CountryID" ColumnName="CountryID" />
  670. <ScalarProperty Name="Title" ColumnName="Title" />
  671. <ScalarProperty Name="Phone" ColumnName="Phone" />
  672. <ScalarProperty Name="Contact" ColumnName="Contact" />
  673. </MappingFragment>
  674. </EntityTypeMapping>
  675. </EntitySetMapping>
  676. <EntitySetMapping Name="Roles">
  677. <EntityTypeMapping TypeName="Session3_4Model.Roles">
  678. <MappingFragment StoreEntitySet="Roles">
  679. <ScalarProperty Name="ID" ColumnName="ID" />
  680. <ScalarProperty Name="Title" ColumnName="Title" />
  681. </MappingFragment>
  682. </EntityTypeMapping>
  683. </EntitySetMapping>
  684. <EntitySetMapping Name="Routes">
  685. <EntityTypeMapping TypeName="Session3_4Model.Routes">
  686. <MappingFragment StoreEntitySet="Routes">
  687. <ScalarProperty Name="ID" ColumnName="ID" />
  688. <ScalarProperty Name="DepartureAirportID" ColumnName="DepartureAirportID" />
  689. <ScalarProperty Name="ArrivalAirportID" ColumnName="ArrivalAirportID" />
  690. <ScalarProperty Name="Distance" ColumnName="Distance" />
  691. <ScalarProperty Name="FlightTime" ColumnName="FlightTime" />
  692. </MappingFragment>
  693. </EntityTypeMapping>
  694. </EntitySetMapping>
  695. <EntitySetMapping Name="Schedules">
  696. <EntityTypeMapping TypeName="Session3_4Model.Schedules">
  697. <MappingFragment StoreEntitySet="Schedules">
  698. <ScalarProperty Name="ID" ColumnName="ID" />
  699. <ScalarProperty Name="Date" ColumnName="Date" />
  700. <ScalarProperty Name="Time" ColumnName="Time" />
  701. <ScalarProperty Name="AircraftID" ColumnName="AircraftID" />
  702. <ScalarProperty Name="RouteID" ColumnName="RouteID" />
  703. <ScalarProperty Name="EconomyPrice" ColumnName="EconomyPrice" />
  704. <ScalarProperty Name="Confirmed" ColumnName="Confirmed" />
  705. <ScalarProperty Name="FlightNumber" ColumnName="FlightNumber" />
  706. </MappingFragment>
  707. </EntityTypeMapping>
  708. </EntitySetMapping>
  709. <EntitySetMapping Name="Tickets">
  710. <EntityTypeMapping TypeName="Session3_4Model.Tickets">
  711. <MappingFragment StoreEntitySet="Tickets">
  712. <ScalarProperty Name="ID" ColumnName="ID" />
  713. <ScalarProperty Name="UserID" ColumnName="UserID" />
  714. <ScalarProperty Name="ScheduleID" ColumnName="ScheduleID" />
  715. <ScalarProperty Name="CabinTypeID" ColumnName="CabinTypeID" />
  716. <ScalarProperty Name="Firstname" ColumnName="Firstname" />
  717. <ScalarProperty Name="Lastname" ColumnName="Lastname" />
  718. <ScalarProperty Name="Email" ColumnName="Email" />
  719. <ScalarProperty Name="Phone" ColumnName="Phone" />
  720. <ScalarProperty Name="PassportNumber" ColumnName="PassportNumber" />
  721. <ScalarProperty Name="PassportCountryID" ColumnName="PassportCountryID" />
  722. <ScalarProperty Name="BookingReference" ColumnName="BookingReference" />
  723. <ScalarProperty Name="Confirmed" ColumnName="Confirmed" />
  724. </MappingFragment>
  725. </EntityTypeMapping>
  726. </EntitySetMapping>
  727. <EntitySetMapping Name="Users">
  728. <EntityTypeMapping TypeName="Session3_4Model.Users">
  729. <MappingFragment StoreEntitySet="Users">
  730. <ScalarProperty Name="ID" ColumnName="ID" />
  731. <ScalarProperty Name="RoleID" ColumnName="RoleID" />
  732. <ScalarProperty Name="Email" ColumnName="Email" />
  733. <ScalarProperty Name="Password" ColumnName="Password" />
  734. <ScalarProperty Name="FirstName" ColumnName="FirstName" />
  735. <ScalarProperty Name="LastName" ColumnName="LastName" />
  736. <ScalarProperty Name="OfficeID" ColumnName="OfficeID" />
  737. <ScalarProperty Name="Birthdate" ColumnName="Birthdate" />
  738. <ScalarProperty Name="Active" ColumnName="Active" />
  739. </MappingFragment>
  740. </EntityTypeMapping>
  741. </EntitySetMapping>
  742. </EntityContainerMapping>
  743. </Mapping>
  744. </edmx:Mappings>
  745. </edmx:Runtime>
  746. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  747. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  748. <Connection>
  749. <DesignerInfoPropertySet>
  750. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  751. </DesignerInfoPropertySet>
  752. </Connection>
  753. <Options>
  754. <DesignerInfoPropertySet>
  755. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  756. <DesignerProperty Name="EnablePluralization" Value="false" />
  757. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  758. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  759. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  760. </DesignerInfoPropertySet>
  761. </Options>
  762. <!-- Diagram content (shape and connector positions) -->
  763. <Diagrams></Diagrams>
  764. </Designer>
  765. </edmx:Edmx>