StoreModel.ssdl 12 KB

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