Cafe.edmx 30 KB

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