EDM.edmx 33 KB

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