ModelStore.ssdl 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="gr672_pgvModel.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">
  3. <EntityType Name="Cashier">
  4. <Key>
  5. <PropertyRef Name="CashierID" />
  6. </Key>
  7. <Property Name="CashierID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  8. <Property Name="IDStore" Type="int" Nullable="false" />
  9. </EntityType>
  10. <EntityType Name="Employee">
  11. <Key>
  12. <PropertyRef Name="EmployeeID" />
  13. </Key>
  14. <Property Name="EmployeeID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  15. <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
  16. <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  17. <Property Name="MiddleName" Type="nvarchar" MaxLength="50" Nullable="false" />
  18. <Property Name="Code" Type="nvarchar" MaxLength="5" Nullable="false" />
  19. </EntityType>
  20. <EntityType Name="EmployeeInStore">
  21. <Key>
  22. <PropertyRef Name="IDEmployeeInStore" />
  23. </Key>
  24. <Property Name="IDStore" Type="int" Nullable="false" />
  25. <Property Name="IDEmployee" Type="int" Nullable="false" />
  26. <Property Name="IDEmployeeInStore" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  27. </EntityType>
  28. <EntityType Name="Order">
  29. <Key>
  30. <PropertyRef Name="OrderID" />
  31. </Key>
  32. <Property Name="OrderID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  33. <Property Name="Date" Type="date" Nullable="false" />
  34. <Property Name="IDWorkShift" Type="int" Nullable="false" />
  35. <Property Name="State" Type="bit" Nullable="false" />
  36. </EntityType>
  37. <EntityType Name="PaymentMetod">
  38. <Key>
  39. <PropertyRef Name="PaymentMetodID" />
  40. </Key>
  41. <Property Name="PaymentMetodID" Type="int" Nullable="false" />
  42. <Property Name="PaymentMetodName" Type="nvarchar" MaxLength="50" Nullable="false" />
  43. </EntityType>
  44. <EntityType Name="PaymentOrder">
  45. <Key>
  46. <PropertyRef Name="PaymentID" />
  47. </Key>
  48. <Property Name="PaymentID" Type="int" Nullable="false" />
  49. <Property Name="IDPaymentMetod" Type="int" Nullable="false" />
  50. <Property Name="IDOrder" Type="int" Nullable="false" />
  51. </EntityType>
  52. <EntityType Name="Product">
  53. <Key>
  54. <PropertyRef Name="ProductID" />
  55. </Key>
  56. <Property Name="ProductID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  57. <Property Name="NameProduct" Type="nvarchar(max)" Nullable="false" />
  58. <Property Name="Weight" Type="int" Nullable="false" />
  59. <Property Name="Packaging" Type="int" Nullable="false" />
  60. <Property Name="PriceOfOne" Type="money" Nullable="false" />
  61. <Property Name="BarCode" Type="nvarchar(max)" Nullable="false" />
  62. </EntityType>
  63. <EntityType Name="ProductInOrder">
  64. <Key>
  65. <PropertyRef Name="IDOrder" />
  66. <PropertyRef Name="IDProduct" />
  67. </Key>
  68. <Property Name="IDOrder" Type="int" Nullable="false" />
  69. <Property Name="IDProduct" Type="int" Nullable="false" />
  70. <Property Name="AmountProduct" Type="int" Nullable="false" />
  71. </EntityType>
  72. <EntityType Name="ProductInStore">
  73. <Key>
  74. <PropertyRef Name="ProductInStoreID" />
  75. </Key>
  76. <Property Name="ProductInStoreID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  77. <Property Name="IDStore" Type="int" Nullable="false" />
  78. <Property Name="IDProduct" Type="int" Nullable="false" />
  79. <Property Name="RemainsProduct" Type="int" Nullable="false" />
  80. </EntityType>
  81. <EntityType Name="Store">
  82. <Key>
  83. <PropertyRef Name="StoreID" />
  84. </Key>
  85. <Property Name="StoreID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  86. <Property Name="Address" Type="nvarchar(max)" Nullable="false" />
  87. </EntityType>
  88. <EntityType Name="WorkShift">
  89. <Key>
  90. <PropertyRef Name="WorkShiftID" />
  91. </Key>
  92. <Property Name="WorkShiftID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  93. <Property Name="IDCashier" Type="int" Nullable="false" />
  94. <Property Name="IDEmployee" Type="int" Nullable="false" />
  95. <Property Name="StartDateAndTimeWork" Type="datetime" />
  96. <Property Name="EndDateAndTimeWork" Type="datetime" />
  97. </EntityType>
  98. <Association Name="FK_Cashier_Store">
  99. <End Role="Store" Type="Self.Store" Multiplicity="1" />
  100. <End Role="Cashier" Type="Self.Cashier" Multiplicity="*" />
  101. <ReferentialConstraint>
  102. <Principal Role="Store">
  103. <PropertyRef Name="StoreID" />
  104. </Principal>
  105. <Dependent Role="Cashier">
  106. <PropertyRef Name="IDStore" />
  107. </Dependent>
  108. </ReferentialConstraint>
  109. </Association>
  110. <Association Name="FK_EmployeeInStore_Employee">
  111. <End Role="Employee" Type="Self.Employee" Multiplicity="1" />
  112. <End Role="EmployeeInStore" Type="Self.EmployeeInStore" Multiplicity="*" />
  113. <ReferentialConstraint>
  114. <Principal Role="Employee">
  115. <PropertyRef Name="EmployeeID" />
  116. </Principal>
  117. <Dependent Role="EmployeeInStore">
  118. <PropertyRef Name="IDEmployee" />
  119. </Dependent>
  120. </ReferentialConstraint>
  121. </Association>
  122. <Association Name="FK_EmployeeInStore_Store">
  123. <End Role="Store" Type="Self.Store" Multiplicity="1" />
  124. <End Role="EmployeeInStore" Type="Self.EmployeeInStore" Multiplicity="*" />
  125. <ReferentialConstraint>
  126. <Principal Role="Store">
  127. <PropertyRef Name="StoreID" />
  128. </Principal>
  129. <Dependent Role="EmployeeInStore">
  130. <PropertyRef Name="IDStore" />
  131. </Dependent>
  132. </ReferentialConstraint>
  133. </Association>
  134. <Association Name="FK_Order_WorkShift">
  135. <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="1" />
  136. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  137. <ReferentialConstraint>
  138. <Principal Role="WorkShift">
  139. <PropertyRef Name="WorkShiftID" />
  140. </Principal>
  141. <Dependent Role="Order">
  142. <PropertyRef Name="IDWorkShift" />
  143. </Dependent>
  144. </ReferentialConstraint>
  145. </Association>
  146. <Association Name="FK_PaymentOrder_Order">
  147. <End Role="Order" Type="Self.Order" Multiplicity="1" />
  148. <End Role="PaymentOrder" Type="Self.PaymentOrder" Multiplicity="*" />
  149. <ReferentialConstraint>
  150. <Principal Role="Order">
  151. <PropertyRef Name="OrderID" />
  152. </Principal>
  153. <Dependent Role="PaymentOrder">
  154. <PropertyRef Name="IDOrder" />
  155. </Dependent>
  156. </ReferentialConstraint>
  157. </Association>
  158. <Association Name="FK_PaymentOrder_PaymentMetod">
  159. <End Role="PaymentMetod" Type="Self.PaymentMetod" Multiplicity="1" />
  160. <End Role="PaymentOrder" Type="Self.PaymentOrder" Multiplicity="*" />
  161. <ReferentialConstraint>
  162. <Principal Role="PaymentMetod">
  163. <PropertyRef Name="PaymentMetodID" />
  164. </Principal>
  165. <Dependent Role="PaymentOrder">
  166. <PropertyRef Name="IDPaymentMetod" />
  167. </Dependent>
  168. </ReferentialConstraint>
  169. </Association>
  170. <Association Name="FK_ProductInOrder_Order">
  171. <End Role="Order" Type="Self.Order" Multiplicity="1" />
  172. <End Role="ProductInOrder" Type="Self.ProductInOrder" Multiplicity="*" />
  173. <ReferentialConstraint>
  174. <Principal Role="Order">
  175. <PropertyRef Name="OrderID" />
  176. </Principal>
  177. <Dependent Role="ProductInOrder">
  178. <PropertyRef Name="IDOrder" />
  179. </Dependent>
  180. </ReferentialConstraint>
  181. </Association>
  182. <Association Name="FK_ProductInOrder_ProductInStore">
  183. <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="1" />
  184. <End Role="ProductInOrder" Type="Self.ProductInOrder" Multiplicity="*" />
  185. <ReferentialConstraint>
  186. <Principal Role="ProductInStore">
  187. <PropertyRef Name="ProductInStoreID" />
  188. </Principal>
  189. <Dependent Role="ProductInOrder">
  190. <PropertyRef Name="IDProduct" />
  191. </Dependent>
  192. </ReferentialConstraint>
  193. </Association>
  194. <Association Name="FK_ProductInStore_Product">
  195. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  196. <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="*" />
  197. <ReferentialConstraint>
  198. <Principal Role="Product">
  199. <PropertyRef Name="ProductID" />
  200. </Principal>
  201. <Dependent Role="ProductInStore">
  202. <PropertyRef Name="IDProduct" />
  203. </Dependent>
  204. </ReferentialConstraint>
  205. </Association>
  206. <Association Name="FK_ProductInStore_Store">
  207. <End Role="Store" Type="Self.Store" Multiplicity="1" />
  208. <End Role="ProductInStore" Type="Self.ProductInStore" Multiplicity="*" />
  209. <ReferentialConstraint>
  210. <Principal Role="Store">
  211. <PropertyRef Name="StoreID" />
  212. </Principal>
  213. <Dependent Role="ProductInStore">
  214. <PropertyRef Name="IDStore" />
  215. </Dependent>
  216. </ReferentialConstraint>
  217. </Association>
  218. <Association Name="FK_WorkShift_Cashier">
  219. <End Role="Cashier" Type="Self.Cashier" Multiplicity="1" />
  220. <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="*" />
  221. <ReferentialConstraint>
  222. <Principal Role="Cashier">
  223. <PropertyRef Name="CashierID" />
  224. </Principal>
  225. <Dependent Role="WorkShift">
  226. <PropertyRef Name="IDCashier" />
  227. </Dependent>
  228. </ReferentialConstraint>
  229. </Association>
  230. <Association Name="FK_WorkShift_EmployeeInStore">
  231. <End Role="EmployeeInStore" Type="Self.EmployeeInStore" Multiplicity="1" />
  232. <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="*" />
  233. <ReferentialConstraint>
  234. <Principal Role="EmployeeInStore">
  235. <PropertyRef Name="IDEmployeeInStore" />
  236. </Principal>
  237. <Dependent Role="WorkShift">
  238. <PropertyRef Name="IDEmployee" />
  239. </Dependent>
  240. </ReferentialConstraint>
  241. </Association>
  242. <EntityContainer Name="gr672_pgvModelStoreContainer">
  243. <EntitySet Name="Cashier" EntityType="Self.Cashier" Schema="dbo" store:Type="Tables" />
  244. <EntitySet Name="Employee" EntityType="Self.Employee" Schema="dbo" store:Type="Tables" />
  245. <EntitySet Name="EmployeeInStore" EntityType="Self.EmployeeInStore" Schema="dbo" store:Type="Tables" />
  246. <EntitySet Name="Order" EntityType="Self.Order" Schema="dbo" store:Type="Tables" />
  247. <EntitySet Name="PaymentMetod" EntityType="Self.PaymentMetod" Schema="dbo" store:Type="Tables" />
  248. <EntitySet Name="PaymentOrder" EntityType="Self.PaymentOrder" Schema="dbo" store:Type="Tables" />
  249. <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
  250. <EntitySet Name="ProductInOrder" EntityType="Self.ProductInOrder" Schema="dbo" store:Type="Tables" />
  251. <EntitySet Name="ProductInStore" EntityType="Self.ProductInStore" Schema="dbo" store:Type="Tables" />
  252. <EntitySet Name="Store" EntityType="Self.Store" Schema="dbo" store:Type="Tables" />
  253. <EntitySet Name="WorkShift" EntityType="Self.WorkShift" Schema="dbo" store:Type="Tables" />
  254. <AssociationSet Name="FK_Cashier_Store" Association="Self.FK_Cashier_Store">
  255. <End Role="Store" EntitySet="Store" />
  256. <End Role="Cashier" EntitySet="Cashier" />
  257. </AssociationSet>
  258. <AssociationSet Name="FK_EmployeeInStore_Employee" Association="Self.FK_EmployeeInStore_Employee">
  259. <End Role="Employee" EntitySet="Employee" />
  260. <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
  261. </AssociationSet>
  262. <AssociationSet Name="FK_EmployeeInStore_Store" Association="Self.FK_EmployeeInStore_Store">
  263. <End Role="Store" EntitySet="Store" />
  264. <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
  265. </AssociationSet>
  266. <AssociationSet Name="FK_Order_WorkShift" Association="Self.FK_Order_WorkShift">
  267. <End Role="WorkShift" EntitySet="WorkShift" />
  268. <End Role="Order" EntitySet="Order" />
  269. </AssociationSet>
  270. <AssociationSet Name="FK_PaymentOrder_Order" Association="Self.FK_PaymentOrder_Order">
  271. <End Role="Order" EntitySet="Order" />
  272. <End Role="PaymentOrder" EntitySet="PaymentOrder" />
  273. </AssociationSet>
  274. <AssociationSet Name="FK_PaymentOrder_PaymentMetod" Association="Self.FK_PaymentOrder_PaymentMetod">
  275. <End Role="PaymentMetod" EntitySet="PaymentMetod" />
  276. <End Role="PaymentOrder" EntitySet="PaymentOrder" />
  277. </AssociationSet>
  278. <AssociationSet Name="FK_ProductInOrder_Order" Association="Self.FK_ProductInOrder_Order">
  279. <End Role="Order" EntitySet="Order" />
  280. <End Role="ProductInOrder" EntitySet="ProductInOrder" />
  281. </AssociationSet>
  282. <AssociationSet Name="FK_ProductInOrder_ProductInStore" Association="Self.FK_ProductInOrder_ProductInStore">
  283. <End Role="ProductInStore" EntitySet="ProductInStore" />
  284. <End Role="ProductInOrder" EntitySet="ProductInOrder" />
  285. </AssociationSet>
  286. <AssociationSet Name="FK_ProductInStore_Product" Association="Self.FK_ProductInStore_Product">
  287. <End Role="Product" EntitySet="Product" />
  288. <End Role="ProductInStore" EntitySet="ProductInStore" />
  289. </AssociationSet>
  290. <AssociationSet Name="FK_ProductInStore_Store" Association="Self.FK_ProductInStore_Store">
  291. <End Role="Store" EntitySet="Store" />
  292. <End Role="ProductInStore" EntitySet="ProductInStore" />
  293. </AssociationSet>
  294. <AssociationSet Name="FK_WorkShift_Cashier" Association="Self.FK_WorkShift_Cashier">
  295. <End Role="Cashier" EntitySet="Cashier" />
  296. <End Role="WorkShift" EntitySet="WorkShift" />
  297. </AssociationSet>
  298. <AssociationSet Name="FK_WorkShift_EmployeeInStore" Association="Self.FK_WorkShift_EmployeeInStore">
  299. <End Role="EmployeeInStore" EntitySet="EmployeeInStore" />
  300. <End Role="WorkShift" EntitySet="WorkShift" />
  301. </AssociationSet>
  302. </EntityContainer>
  303. </Schema>