EDM.edmx 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  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="RouteScheduleDataBaseModel.Store" 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="Carriages">
  9. <Key>
  10. <PropertyRef Name="IdCarriage" />
  11. </Key>
  12. <Property Name="IdCarriage" Type="int" Nullable="false" />
  13. <Property Name="IdTrain" Type="int" Nullable="false" />
  14. <Property Name="Places" Type="int" Nullable="false" />
  15. </EntityType>
  16. <EntityType Name="Routes">
  17. <Key>
  18. <PropertyRef Name="IdRoute" />
  19. </Key>
  20. <Property Name="IdRoute" Type="int" Nullable="false" />
  21. <Property Name="Name" Type="nvarchar" MaxLength="50" />
  22. </EntityType>
  23. <EntityType Name="RoutesStations">
  24. <Key>
  25. <PropertyRef Name="IdRouteStation" />
  26. </Key>
  27. <Property Name="IdRouteStation" Type="int" Nullable="false" />
  28. <Property Name="IdRoute" Type="int" Nullable="false" />
  29. <Property Name="IdStation" Type="int" Nullable="false" />
  30. <Property Name="StopTime" Type="time" Precision="7" Nullable="false" />
  31. <Property Name="TravelTime" Type="time" Precision="7" Nullable="false" />
  32. </EntityType>
  33. <EntityType Name="Stations">
  34. <Key>
  35. <PropertyRef Name="IdStation" />
  36. </Key>
  37. <Property Name="IdStation" Type="int" Nullable="false" />
  38. <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  39. <Property Name="Location" Type="nvarchar" MaxLength="50" Nullable="false" />
  40. </EntityType>
  41. <EntityType Name="sysdiagrams">
  42. <Key>
  43. <PropertyRef Name="diagram_id" />
  44. </Key>
  45. <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
  46. <Property Name="principal_id" Type="int" Nullable="false" />
  47. <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  48. <Property Name="version" Type="int" />
  49. <Property Name="definition" Type="varbinary(max)" />
  50. </EntityType>
  51. <EntityType Name="Tickets">
  52. <Key>
  53. <PropertyRef Name="IdTicket" />
  54. </Key>
  55. <Property Name="IdTicket" Type="int" Nullable="false" />
  56. <Property Name="IdUser" Type="int" Nullable="false" />
  57. <Property Name="IdTrip" Type="int" Nullable="false" />
  58. <Property Name="IdCarriage" Type="int" Nullable="false" />
  59. <Property Name="PlaceNumber" Type="int" Nullable="false" />
  60. <Property Name="Category" Type="int" Nullable="false" />
  61. <Property Name="BuyDate" Type="datetime" Nullable="false" />
  62. </EntityType>
  63. <EntityType Name="Trains">
  64. <Key>
  65. <PropertyRef Name="IdTrain" />
  66. </Key>
  67. <Property Name="IdTrain" Type="int" Nullable="false" />
  68. <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  69. <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
  70. </EntityType>
  71. <EntityType Name="Trips">
  72. <Key>
  73. <PropertyRef Name="IdTrip" />
  74. </Key>
  75. <Property Name="IdTrip" Type="int" Nullable="false" />
  76. <Property Name="IdTrain" Type="int" Nullable="false" />
  77. <Property Name="IdRoute" Type="int" Nullable="false" />
  78. <Property Name="TripStartDate" Type="date" Nullable="false" />
  79. </EntityType>
  80. <EntityType Name="Users">
  81. <Key>
  82. <PropertyRef Name="IdUser" />
  83. </Key>
  84. <Property Name="IdUser" Type="int" Nullable="false" />
  85. <Property Name="Login" Type="nvarchar" MaxLength="50" Nullable="false" />
  86. <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
  87. <Property Name="Passport" Type="nvarchar" MaxLength="10" />
  88. <Property Name="Surname" Type="nvarchar" MaxLength="50" />
  89. <Property Name="Name" Type="nvarchar" MaxLength="50" />
  90. <Property Name="Patronymic" Type="nvarchar" MaxLength="50" />
  91. <Property Name="Permissions" Type="int" Nullable="false" />
  92. </EntityType>
  93. <Association Name="FK_Carriages_Trains">
  94. <End Role="Trains" Type="Self.Trains" Multiplicity="1" />
  95. <End Role="Carriages" Type="Self.Carriages" Multiplicity="*" />
  96. <ReferentialConstraint>
  97. <Principal Role="Trains">
  98. <PropertyRef Name="IdTrain" />
  99. </Principal>
  100. <Dependent Role="Carriages">
  101. <PropertyRef Name="IdTrain" />
  102. </Dependent>
  103. </ReferentialConstraint>
  104. </Association>
  105. <Association Name="FK_RoutesStations_Routes">
  106. <End Role="Routes" Type="Self.Routes" Multiplicity="1" />
  107. <End Role="RoutesStations" Type="Self.RoutesStations" Multiplicity="*" />
  108. <ReferentialConstraint>
  109. <Principal Role="Routes">
  110. <PropertyRef Name="IdRoute" />
  111. </Principal>
  112. <Dependent Role="RoutesStations">
  113. <PropertyRef Name="IdRoute" />
  114. </Dependent>
  115. </ReferentialConstraint>
  116. </Association>
  117. <Association Name="FK_RoutesStations_Stations">
  118. <End Role="Stations" Type="Self.Stations" Multiplicity="1" />
  119. <End Role="RoutesStations" Type="Self.RoutesStations" Multiplicity="*" />
  120. <ReferentialConstraint>
  121. <Principal Role="Stations">
  122. <PropertyRef Name="IdStation" />
  123. </Principal>
  124. <Dependent Role="RoutesStations">
  125. <PropertyRef Name="IdStation" />
  126. </Dependent>
  127. </ReferentialConstraint>
  128. </Association>
  129. <Association Name="FK_Tickets_Carriages">
  130. <End Role="Carriages" Type="Self.Carriages" Multiplicity="1" />
  131. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  132. <ReferentialConstraint>
  133. <Principal Role="Carriages">
  134. <PropertyRef Name="IdCarriage" />
  135. </Principal>
  136. <Dependent Role="Tickets">
  137. <PropertyRef Name="IdCarriage" />
  138. </Dependent>
  139. </ReferentialConstraint>
  140. </Association>
  141. <Association Name="FK_Tickets_Trips">
  142. <End Role="Trips" Type="Self.Trips" Multiplicity="1" />
  143. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  144. <ReferentialConstraint>
  145. <Principal Role="Trips">
  146. <PropertyRef Name="IdTrip" />
  147. </Principal>
  148. <Dependent Role="Tickets">
  149. <PropertyRef Name="IdTrip" />
  150. </Dependent>
  151. </ReferentialConstraint>
  152. </Association>
  153. <Association Name="FK_Tickets_Users">
  154. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  155. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  156. <ReferentialConstraint>
  157. <Principal Role="Users">
  158. <PropertyRef Name="IdUser" />
  159. </Principal>
  160. <Dependent Role="Tickets">
  161. <PropertyRef Name="IdUser" />
  162. </Dependent>
  163. </ReferentialConstraint>
  164. </Association>
  165. <Association Name="FK_Trips_Routes">
  166. <End Role="Routes" Type="Self.Routes" Multiplicity="1" />
  167. <End Role="Trips" Type="Self.Trips" Multiplicity="*" />
  168. <ReferentialConstraint>
  169. <Principal Role="Routes">
  170. <PropertyRef Name="IdRoute" />
  171. </Principal>
  172. <Dependent Role="Trips">
  173. <PropertyRef Name="IdRoute" />
  174. </Dependent>
  175. </ReferentialConstraint>
  176. </Association>
  177. <Association Name="FK_Trips_Trains">
  178. <End Role="Trains" Type="Self.Trains" Multiplicity="1" />
  179. <End Role="Trips" Type="Self.Trips" Multiplicity="*" />
  180. <ReferentialConstraint>
  181. <Principal Role="Trains">
  182. <PropertyRef Name="IdTrain" />
  183. </Principal>
  184. <Dependent Role="Trips">
  185. <PropertyRef Name="IdTrain" />
  186. </Dependent>
  187. </ReferentialConstraint>
  188. </Association>
  189. <EntityContainer Name="RouteScheduleDataBaseModelStoreContainer">
  190. <EntitySet Name="Carriages" EntityType="Self.Carriages" Schema="dbo" store:Type="Tables" />
  191. <EntitySet Name="Routes" EntityType="Self.Routes" Schema="dbo" store:Type="Tables" />
  192. <EntitySet Name="RoutesStations" EntityType="Self.RoutesStations" Schema="dbo" store:Type="Tables" />
  193. <EntitySet Name="Stations" EntityType="Self.Stations" Schema="dbo" store:Type="Tables" />
  194. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
  195. <EntitySet Name="Tickets" EntityType="Self.Tickets" Schema="dbo" store:Type="Tables" />
  196. <EntitySet Name="Trains" EntityType="Self.Trains" Schema="dbo" store:Type="Tables" />
  197. <EntitySet Name="Trips" EntityType="Self.Trips" Schema="dbo" store:Type="Tables" />
  198. <EntitySet Name="Users" EntityType="Self.Users" Schema="dbo" store:Type="Tables" />
  199. <AssociationSet Name="FK_Carriages_Trains" Association="Self.FK_Carriages_Trains">
  200. <End Role="Trains" EntitySet="Trains" />
  201. <End Role="Carriages" EntitySet="Carriages" />
  202. </AssociationSet>
  203. <AssociationSet Name="FK_RoutesStations_Routes" Association="Self.FK_RoutesStations_Routes">
  204. <End Role="Routes" EntitySet="Routes" />
  205. <End Role="RoutesStations" EntitySet="RoutesStations" />
  206. </AssociationSet>
  207. <AssociationSet Name="FK_RoutesStations_Stations" Association="Self.FK_RoutesStations_Stations">
  208. <End Role="Stations" EntitySet="Stations" />
  209. <End Role="RoutesStations" EntitySet="RoutesStations" />
  210. </AssociationSet>
  211. <AssociationSet Name="FK_Tickets_Carriages" Association="Self.FK_Tickets_Carriages">
  212. <End Role="Carriages" EntitySet="Carriages" />
  213. <End Role="Tickets" EntitySet="Tickets" />
  214. </AssociationSet>
  215. <AssociationSet Name="FK_Tickets_Trips" Association="Self.FK_Tickets_Trips">
  216. <End Role="Trips" EntitySet="Trips" />
  217. <End Role="Tickets" EntitySet="Tickets" />
  218. </AssociationSet>
  219. <AssociationSet Name="FK_Tickets_Users" Association="Self.FK_Tickets_Users">
  220. <End Role="Users" EntitySet="Users" />
  221. <End Role="Tickets" EntitySet="Tickets" />
  222. </AssociationSet>
  223. <AssociationSet Name="FK_Trips_Routes" Association="Self.FK_Trips_Routes">
  224. <End Role="Routes" EntitySet="Routes" />
  225. <End Role="Trips" EntitySet="Trips" />
  226. </AssociationSet>
  227. <AssociationSet Name="FK_Trips_Trains" Association="Self.FK_Trips_Trains">
  228. <End Role="Trains" EntitySet="Trains" />
  229. <End Role="Trips" EntitySet="Trips" />
  230. </AssociationSet>
  231. </EntityContainer>
  232. </Schema></edmx:StorageModels>
  233. <!-- CSDL content -->
  234. <edmx:ConceptualModels>
  235. <Schema Namespace="RouteScheduleDataBaseModel" 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">
  236. <EntityContainer Name="RouteScheduleDataBaseEntities" annotation:LazyLoadingEnabled="true">
  237. <EntitySet Name="Carriages" EntityType="RouteScheduleDataBaseModel.Carriages" />
  238. <EntitySet Name="Routes" EntityType="RouteScheduleDataBaseModel.Routes" />
  239. <EntitySet Name="RoutesStations" EntityType="RouteScheduleDataBaseModel.RoutesStations" />
  240. <EntitySet Name="Stations" EntityType="RouteScheduleDataBaseModel.Stations" />
  241. <EntitySet Name="sysdiagrams" EntityType="RouteScheduleDataBaseModel.sysdiagrams" />
  242. <EntitySet Name="Tickets" EntityType="RouteScheduleDataBaseModel.Tickets" />
  243. <EntitySet Name="Trains" EntityType="RouteScheduleDataBaseModel.Trains" />
  244. <EntitySet Name="Trips" EntityType="RouteScheduleDataBaseModel.Trips" />
  245. <EntitySet Name="Users" EntityType="RouteScheduleDataBaseModel.Users" />
  246. <AssociationSet Name="FK_Carriages_Trains" Association="RouteScheduleDataBaseModel.FK_Carriages_Trains">
  247. <End Role="Trains" EntitySet="Trains" />
  248. <End Role="Carriages" EntitySet="Carriages" />
  249. </AssociationSet>
  250. <AssociationSet Name="FK_Tickets_Carriages" Association="RouteScheduleDataBaseModel.FK_Tickets_Carriages">
  251. <End Role="Carriages" EntitySet="Carriages" />
  252. <End Role="Tickets" EntitySet="Tickets" />
  253. </AssociationSet>
  254. <AssociationSet Name="FK_RoutesStations_Routes" Association="RouteScheduleDataBaseModel.FK_RoutesStations_Routes">
  255. <End Role="Routes" EntitySet="Routes" />
  256. <End Role="RoutesStations" EntitySet="RoutesStations" />
  257. </AssociationSet>
  258. <AssociationSet Name="FK_Trips_Routes" Association="RouteScheduleDataBaseModel.FK_Trips_Routes">
  259. <End Role="Routes" EntitySet="Routes" />
  260. <End Role="Trips" EntitySet="Trips" />
  261. </AssociationSet>
  262. <AssociationSet Name="FK_RoutesStations_Stations" Association="RouteScheduleDataBaseModel.FK_RoutesStations_Stations">
  263. <End Role="Stations" EntitySet="Stations" />
  264. <End Role="RoutesStations" EntitySet="RoutesStations" />
  265. </AssociationSet>
  266. <AssociationSet Name="FK_Tickets_Trips" Association="RouteScheduleDataBaseModel.FK_Tickets_Trips">
  267. <End Role="Trips" EntitySet="Trips" />
  268. <End Role="Tickets" EntitySet="Tickets" />
  269. </AssociationSet>
  270. <AssociationSet Name="FK_Tickets_Users" Association="RouteScheduleDataBaseModel.FK_Tickets_Users">
  271. <End Role="Users" EntitySet="Users" />
  272. <End Role="Tickets" EntitySet="Tickets" />
  273. </AssociationSet>
  274. <AssociationSet Name="FK_Trips_Trains" Association="RouteScheduleDataBaseModel.FK_Trips_Trains">
  275. <End Role="Trains" EntitySet="Trains" />
  276. <End Role="Trips" EntitySet="Trips" />
  277. </AssociationSet>
  278. </EntityContainer>
  279. <EntityType Name="Carriages">
  280. <Key>
  281. <PropertyRef Name="IdCarriage" />
  282. </Key>
  283. <Property Name="IdCarriage" Type="Int32" Nullable="false" />
  284. <Property Name="IdTrain" Type="Int32" Nullable="false" />
  285. <Property Name="Places" Type="Int32" Nullable="false" />
  286. <NavigationProperty Name="Trains" Relationship="RouteScheduleDataBaseModel.FK_Carriages_Trains" FromRole="Carriages" ToRole="Trains" />
  287. <NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Carriages" FromRole="Carriages" ToRole="Tickets" />
  288. </EntityType>
  289. <EntityType Name="Routes">
  290. <Key>
  291. <PropertyRef Name="IdRoute" />
  292. </Key>
  293. <Property Name="IdRoute" Type="Int32" Nullable="false" />
  294. <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  295. <NavigationProperty Name="RoutesStations" Relationship="RouteScheduleDataBaseModel.FK_RoutesStations_Routes" FromRole="Routes" ToRole="RoutesStations" />
  296. <NavigationProperty Name="Trips" Relationship="RouteScheduleDataBaseModel.FK_Trips_Routes" FromRole="Routes" ToRole="Trips" />
  297. </EntityType>
  298. <EntityType Name="RoutesStations">
  299. <Key>
  300. <PropertyRef Name="IdRouteStation" />
  301. </Key>
  302. <Property Name="IdRouteStation" Type="Int32" Nullable="false" />
  303. <Property Name="IdRoute" Type="Int32" Nullable="false" />
  304. <Property Name="IdStation" Type="Int32" Nullable="false" />
  305. <Property Name="StopTime" Type="Time" Nullable="false" Precision="7" />
  306. <Property Name="TravelTime" Type="Time" Nullable="false" Precision="7" />
  307. <NavigationProperty Name="Routes" Relationship="RouteScheduleDataBaseModel.FK_RoutesStations_Routes" FromRole="RoutesStations" ToRole="Routes" />
  308. <NavigationProperty Name="Stations" Relationship="RouteScheduleDataBaseModel.FK_RoutesStations_Stations" FromRole="RoutesStations" ToRole="Stations" />
  309. </EntityType>
  310. <EntityType Name="Stations">
  311. <Key>
  312. <PropertyRef Name="IdStation" />
  313. </Key>
  314. <Property Name="IdStation" Type="Int32" Nullable="false" />
  315. <Property Name="Name" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  316. <Property Name="Location" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  317. <NavigationProperty Name="RoutesStations" Relationship="RouteScheduleDataBaseModel.FK_RoutesStations_Stations" FromRole="Stations" ToRole="RoutesStations" />
  318. </EntityType>
  319. <EntityType Name="sysdiagrams">
  320. <Key>
  321. <PropertyRef Name="diagram_id" />
  322. </Key>
  323. <Property Name="name" Type="String" Nullable="false" MaxLength="128" FixedLength="false" Unicode="true" />
  324. <Property Name="principal_id" Type="Int32" Nullable="false" />
  325. <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  326. <Property Name="version" Type="Int32" />
  327. <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
  328. </EntityType>
  329. <EntityType Name="Tickets">
  330. <Key>
  331. <PropertyRef Name="IdTicket" />
  332. </Key>
  333. <Property Name="IdTicket" Type="Int32" Nullable="false" />
  334. <Property Name="IdUser" Type="Int32" Nullable="false" />
  335. <Property Name="IdTrip" Type="Int32" Nullable="false" />
  336. <Property Name="IdCarriage" Type="Int32" Nullable="false" />
  337. <Property Name="PlaceNumber" Type="Int32" Nullable="false" />
  338. <Property Name="Category" Type="Int32" Nullable="false" />
  339. <Property Name="BuyDate" Type="DateTime" Nullable="false" Precision="3" />
  340. <NavigationProperty Name="Carriages" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Carriages" FromRole="Tickets" ToRole="Carriages" />
  341. <NavigationProperty Name="Trips" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Trips" FromRole="Tickets" ToRole="Trips" />
  342. <NavigationProperty Name="Users" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Users" FromRole="Tickets" ToRole="Users" />
  343. </EntityType>
  344. <EntityType Name="Trains">
  345. <Key>
  346. <PropertyRef Name="IdTrain" />
  347. </Key>
  348. <Property Name="IdTrain" Type="Int32" Nullable="false" />
  349. <Property Name="Name" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  350. <Property Name="Category" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  351. <NavigationProperty Name="Carriages" Relationship="RouteScheduleDataBaseModel.FK_Carriages_Trains" FromRole="Trains" ToRole="Carriages" />
  352. <NavigationProperty Name="Trips" Relationship="RouteScheduleDataBaseModel.FK_Trips_Trains" FromRole="Trains" ToRole="Trips" />
  353. </EntityType>
  354. <EntityType Name="Trips">
  355. <Key>
  356. <PropertyRef Name="IdTrip" />
  357. </Key>
  358. <Property Name="IdTrip" Type="Int32" Nullable="false" />
  359. <Property Name="IdTrain" Type="Int32" Nullable="false" />
  360. <Property Name="IdRoute" Type="Int32" Nullable="false" />
  361. <Property Name="TripStartDate" Type="DateTime" Nullable="false" Precision="0" />
  362. <NavigationProperty Name="Routes" Relationship="RouteScheduleDataBaseModel.FK_Trips_Routes" FromRole="Trips" ToRole="Routes" />
  363. <NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Trips" FromRole="Trips" ToRole="Tickets" />
  364. <NavigationProperty Name="Trains" Relationship="RouteScheduleDataBaseModel.FK_Trips_Trains" FromRole="Trips" ToRole="Trains" />
  365. </EntityType>
  366. <EntityType Name="Users">
  367. <Key>
  368. <PropertyRef Name="IdUser" />
  369. </Key>
  370. <Property Name="IdUser" Type="Int32" Nullable="false" />
  371. <Property Name="Login" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  372. <Property Name="Password" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  373. <Property Name="Passport" Type="String" MaxLength="10" FixedLength="false" Unicode="true" />
  374. <Property Name="Surname" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  375. <Property Name="Name" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  376. <Property Name="Patronymic" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  377. <Property Name="Permissions" Type="Int32" Nullable="false" />
  378. <NavigationProperty Name="Tickets" Relationship="RouteScheduleDataBaseModel.FK_Tickets_Users" FromRole="Users" ToRole="Tickets" />
  379. </EntityType>
  380. <Association Name="FK_Carriages_Trains">
  381. <End Type="RouteScheduleDataBaseModel.Trains" Role="Trains" Multiplicity="1" />
  382. <End Type="RouteScheduleDataBaseModel.Carriages" Role="Carriages" Multiplicity="*" />
  383. <ReferentialConstraint>
  384. <Principal Role="Trains">
  385. <PropertyRef Name="IdTrain" />
  386. </Principal>
  387. <Dependent Role="Carriages">
  388. <PropertyRef Name="IdTrain" />
  389. </Dependent>
  390. </ReferentialConstraint>
  391. </Association>
  392. <Association Name="FK_Tickets_Carriages">
  393. <End Type="RouteScheduleDataBaseModel.Carriages" Role="Carriages" Multiplicity="1" />
  394. <End Type="RouteScheduleDataBaseModel.Tickets" Role="Tickets" Multiplicity="*" />
  395. <ReferentialConstraint>
  396. <Principal Role="Carriages">
  397. <PropertyRef Name="IdCarriage" />
  398. </Principal>
  399. <Dependent Role="Tickets">
  400. <PropertyRef Name="IdCarriage" />
  401. </Dependent>
  402. </ReferentialConstraint>
  403. </Association>
  404. <Association Name="FK_RoutesStations_Routes">
  405. <End Type="RouteScheduleDataBaseModel.Routes" Role="Routes" Multiplicity="1" />
  406. <End Type="RouteScheduleDataBaseModel.RoutesStations" Role="RoutesStations" Multiplicity="*" />
  407. <ReferentialConstraint>
  408. <Principal Role="Routes">
  409. <PropertyRef Name="IdRoute" />
  410. </Principal>
  411. <Dependent Role="RoutesStations">
  412. <PropertyRef Name="IdRoute" />
  413. </Dependent>
  414. </ReferentialConstraint>
  415. </Association>
  416. <Association Name="FK_Trips_Routes">
  417. <End Type="RouteScheduleDataBaseModel.Routes" Role="Routes" Multiplicity="1" />
  418. <End Type="RouteScheduleDataBaseModel.Trips" Role="Trips" Multiplicity="*" />
  419. <ReferentialConstraint>
  420. <Principal Role="Routes">
  421. <PropertyRef Name="IdRoute" />
  422. </Principal>
  423. <Dependent Role="Trips">
  424. <PropertyRef Name="IdRoute" />
  425. </Dependent>
  426. </ReferentialConstraint>
  427. </Association>
  428. <Association Name="FK_RoutesStations_Stations">
  429. <End Type="RouteScheduleDataBaseModel.Stations" Role="Stations" Multiplicity="1" />
  430. <End Type="RouteScheduleDataBaseModel.RoutesStations" Role="RoutesStations" Multiplicity="*" />
  431. <ReferentialConstraint>
  432. <Principal Role="Stations">
  433. <PropertyRef Name="IdStation" />
  434. </Principal>
  435. <Dependent Role="RoutesStations">
  436. <PropertyRef Name="IdStation" />
  437. </Dependent>
  438. </ReferentialConstraint>
  439. </Association>
  440. <Association Name="FK_Tickets_Trips">
  441. <End Type="RouteScheduleDataBaseModel.Trips" Role="Trips" Multiplicity="1" />
  442. <End Type="RouteScheduleDataBaseModel.Tickets" Role="Tickets" Multiplicity="*" />
  443. <ReferentialConstraint>
  444. <Principal Role="Trips">
  445. <PropertyRef Name="IdTrip" />
  446. </Principal>
  447. <Dependent Role="Tickets">
  448. <PropertyRef Name="IdTrip" />
  449. </Dependent>
  450. </ReferentialConstraint>
  451. </Association>
  452. <Association Name="FK_Tickets_Users">
  453. <End Type="RouteScheduleDataBaseModel.Users" Role="Users" Multiplicity="1" />
  454. <End Type="RouteScheduleDataBaseModel.Tickets" Role="Tickets" Multiplicity="*" />
  455. <ReferentialConstraint>
  456. <Principal Role="Users">
  457. <PropertyRef Name="IdUser" />
  458. </Principal>
  459. <Dependent Role="Tickets">
  460. <PropertyRef Name="IdUser" />
  461. </Dependent>
  462. </ReferentialConstraint>
  463. </Association>
  464. <Association Name="FK_Trips_Trains">
  465. <End Type="RouteScheduleDataBaseModel.Trains" Role="Trains" Multiplicity="1" />
  466. <End Type="RouteScheduleDataBaseModel.Trips" Role="Trips" Multiplicity="*" />
  467. <ReferentialConstraint>
  468. <Principal Role="Trains">
  469. <PropertyRef Name="IdTrain" />
  470. </Principal>
  471. <Dependent Role="Trips">
  472. <PropertyRef Name="IdTrain" />
  473. </Dependent>
  474. </ReferentialConstraint>
  475. </Association>
  476. </Schema>
  477. </edmx:ConceptualModels>
  478. <!-- C-S mapping content -->
  479. <edmx:Mappings>
  480. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  481. <EntityContainerMapping StorageEntityContainer="RouteScheduleDataBaseModelStoreContainer" CdmEntityContainer="RouteScheduleDataBaseEntities">
  482. <EntitySetMapping Name="Carriages">
  483. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Carriages">
  484. <MappingFragment StoreEntitySet="Carriages">
  485. <ScalarProperty Name="Places" ColumnName="Places" />
  486. <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
  487. <ScalarProperty Name="IdCarriage" ColumnName="IdCarriage" />
  488. </MappingFragment>
  489. </EntityTypeMapping>
  490. </EntitySetMapping>
  491. <EntitySetMapping Name="Routes">
  492. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Routes">
  493. <MappingFragment StoreEntitySet="Routes">
  494. <ScalarProperty Name="Name" ColumnName="Name" />
  495. <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
  496. </MappingFragment>
  497. </EntityTypeMapping>
  498. </EntitySetMapping>
  499. <EntitySetMapping Name="RoutesStations">
  500. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.RoutesStations">
  501. <MappingFragment StoreEntitySet="RoutesStations">
  502. <ScalarProperty Name="TravelTime" ColumnName="TravelTime" />
  503. <ScalarProperty Name="StopTime" ColumnName="StopTime" />
  504. <ScalarProperty Name="IdStation" ColumnName="IdStation" />
  505. <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
  506. <ScalarProperty Name="IdRouteStation" ColumnName="IdRouteStation" />
  507. </MappingFragment>
  508. </EntityTypeMapping>
  509. </EntitySetMapping>
  510. <EntitySetMapping Name="Stations">
  511. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Stations">
  512. <MappingFragment StoreEntitySet="Stations">
  513. <ScalarProperty Name="Location" ColumnName="Location" />
  514. <ScalarProperty Name="Name" ColumnName="Name" />
  515. <ScalarProperty Name="IdStation" ColumnName="IdStation" />
  516. </MappingFragment>
  517. </EntityTypeMapping>
  518. </EntitySetMapping>
  519. <EntitySetMapping Name="sysdiagrams">
  520. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.sysdiagrams">
  521. <MappingFragment StoreEntitySet="sysdiagrams">
  522. <ScalarProperty Name="definition" ColumnName="definition" />
  523. <ScalarProperty Name="version" ColumnName="version" />
  524. <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
  525. <ScalarProperty Name="principal_id" ColumnName="principal_id" />
  526. <ScalarProperty Name="name" ColumnName="name" />
  527. </MappingFragment>
  528. </EntityTypeMapping>
  529. </EntitySetMapping>
  530. <EntitySetMapping Name="Tickets">
  531. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Tickets">
  532. <MappingFragment StoreEntitySet="Tickets">
  533. <ScalarProperty Name="BuyDate" ColumnName="BuyDate" />
  534. <ScalarProperty Name="Category" ColumnName="Category" />
  535. <ScalarProperty Name="PlaceNumber" ColumnName="PlaceNumber" />
  536. <ScalarProperty Name="IdCarriage" ColumnName="IdCarriage" />
  537. <ScalarProperty Name="IdTrip" ColumnName="IdTrip" />
  538. <ScalarProperty Name="IdUser" ColumnName="IdUser" />
  539. <ScalarProperty Name="IdTicket" ColumnName="IdTicket" />
  540. </MappingFragment>
  541. </EntityTypeMapping>
  542. </EntitySetMapping>
  543. <EntitySetMapping Name="Trains">
  544. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Trains">
  545. <MappingFragment StoreEntitySet="Trains">
  546. <ScalarProperty Name="Category" ColumnName="Category" />
  547. <ScalarProperty Name="Name" ColumnName="Name" />
  548. <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
  549. </MappingFragment>
  550. </EntityTypeMapping>
  551. </EntitySetMapping>
  552. <EntitySetMapping Name="Trips">
  553. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Trips">
  554. <MappingFragment StoreEntitySet="Trips">
  555. <ScalarProperty Name="TripStartDate" ColumnName="TripStartDate" />
  556. <ScalarProperty Name="IdRoute" ColumnName="IdRoute" />
  557. <ScalarProperty Name="IdTrain" ColumnName="IdTrain" />
  558. <ScalarProperty Name="IdTrip" ColumnName="IdTrip" />
  559. </MappingFragment>
  560. </EntityTypeMapping>
  561. </EntitySetMapping>
  562. <EntitySetMapping Name="Users">
  563. <EntityTypeMapping TypeName="RouteScheduleDataBaseModel.Users">
  564. <MappingFragment StoreEntitySet="Users">
  565. <ScalarProperty Name="Permissions" ColumnName="Permissions" />
  566. <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
  567. <ScalarProperty Name="Name" ColumnName="Name" />
  568. <ScalarProperty Name="Surname" ColumnName="Surname" />
  569. <ScalarProperty Name="Passport" ColumnName="Passport" />
  570. <ScalarProperty Name="Password" ColumnName="Password" />
  571. <ScalarProperty Name="Login" ColumnName="Login" />
  572. <ScalarProperty Name="IdUser" ColumnName="IdUser" />
  573. </MappingFragment>
  574. </EntityTypeMapping>
  575. </EntitySetMapping>
  576. </EntityContainerMapping>
  577. </Mapping></edmx:Mappings>
  578. </edmx:Runtime>
  579. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  580. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  581. <Connection>
  582. <DesignerInfoPropertySet>
  583. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  584. </DesignerInfoPropertySet>
  585. </Connection>
  586. <Options>
  587. <DesignerInfoPropertySet>
  588. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  589. <DesignerProperty Name="EnablePluralization" Value="false" />
  590. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  591. <DesignerProperty Name="UseLegacyProvider" Value="False" />
  592. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  593. </DesignerInfoPropertySet>
  594. </Options>
  595. <!-- Diagram content (shape and connector positions) -->
  596. <Diagrams></Diagrams>
  597. </Designer>
  598. </edmx:Edmx>