StoreModel.ssdl 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. <Property Name="IDPaymentMetod" Type="int" />
  29. </EntityType>
  30. <EntityType Name="PaymentMetod">
  31. <Key>
  32. <PropertyRef Name="PaymentMetodID" />
  33. </Key>
  34. <Property Name="PaymentMetodID" Type="int" Nullable="false" />
  35. <Property Name="PaymentMetodName" Type="nvarchar" MaxLength="50" Nullable="false" />
  36. </EntityType>
  37. <EntityType Name="Product">
  38. <Key>
  39. <PropertyRef Name="ProductID" />
  40. </Key>
  41. <Property Name="ProductID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  42. <Property Name="NameProduct" Type="nvarchar(max)" Nullable="false" />
  43. <Property Name="Weight" Type="int" Nullable="false" />
  44. <Property Name="Packaging" Type="int" Nullable="false" />
  45. <Property Name="PriceOfOne" Type="money" Nullable="false" />
  46. <Property Name="BarCode" Type="nvarchar(max)" Nullable="false" />
  47. </EntityType>
  48. <EntityType Name="ProductInOrder">
  49. <Key>
  50. <PropertyRef Name="IDOrder" />
  51. <PropertyRef Name="IDProduct" />
  52. </Key>
  53. <Property Name="IDOrder" Type="int" Nullable="false" />
  54. <Property Name="IDProduct" Type="int" Nullable="false" />
  55. <Property Name="AmountProduct" Type="int" Nullable="false" />
  56. </EntityType>
  57. <EntityType Name="Store">
  58. <Key>
  59. <PropertyRef Name="StoreID" />
  60. </Key>
  61. <Property Name="StoreID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  62. <Property Name="Address" Type="nvarchar(max)" Nullable="false" />
  63. </EntityType>
  64. <EntityType Name="WorkShift">
  65. <Key>
  66. <PropertyRef Name="WorkShiftID" />
  67. </Key>
  68. <Property Name="WorkShiftID" Type="int" Nullable="false" />
  69. <Property Name="IDCashier" Type="int" Nullable="false" />
  70. <Property Name="IDEmployee" Type="int" Nullable="false" />
  71. <Property Name="StartDateAndTimeWork" Type="datetime" Nullable="false" />
  72. <Property Name="EndDateAndTimeWork" Type="datetime" />
  73. </EntityType>
  74. <Association Name="FK_Cashier_Store">
  75. <End Role="Store" Type="Self.Store" Multiplicity="1" />
  76. <End Role="Cashier" Type="Self.Cashier" Multiplicity="*" />
  77. <ReferentialConstraint>
  78. <Principal Role="Store">
  79. <PropertyRef Name="StoreID" />
  80. </Principal>
  81. <Dependent Role="Cashier">
  82. <PropertyRef Name="IDStore" />
  83. </Dependent>
  84. </ReferentialConstraint>
  85. </Association>
  86. <Association Name="FK_Order_PaymentMetod">
  87. <End Role="PaymentMetod" Type="Self.PaymentMetod" Multiplicity="0..1" />
  88. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  89. <ReferentialConstraint>
  90. <Principal Role="PaymentMetod">
  91. <PropertyRef Name="PaymentMetodID" />
  92. </Principal>
  93. <Dependent Role="Order">
  94. <PropertyRef Name="IDPaymentMetod" />
  95. </Dependent>
  96. </ReferentialConstraint>
  97. </Association>
  98. <Association Name="FK_Order_WorkShift">
  99. <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="1" />
  100. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  101. <ReferentialConstraint>
  102. <Principal Role="WorkShift">
  103. <PropertyRef Name="WorkShiftID" />
  104. </Principal>
  105. <Dependent Role="Order">
  106. <PropertyRef Name="IDWorkShift" />
  107. </Dependent>
  108. </ReferentialConstraint>
  109. </Association>
  110. <Association Name="FK_ProductInOrder_Order">
  111. <End Role="Order" Type="Self.Order" Multiplicity="1" />
  112. <End Role="ProductInOrder" Type="Self.ProductInOrder" Multiplicity="*" />
  113. <ReferentialConstraint>
  114. <Principal Role="Order">
  115. <PropertyRef Name="OrderID" />
  116. </Principal>
  117. <Dependent Role="ProductInOrder">
  118. <PropertyRef Name="IDOrder" />
  119. </Dependent>
  120. </ReferentialConstraint>
  121. </Association>
  122. <Association Name="FK_ProductInOrder_Product">
  123. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  124. <End Role="ProductInOrder" Type="Self.ProductInOrder" Multiplicity="*" />
  125. <ReferentialConstraint>
  126. <Principal Role="Product">
  127. <PropertyRef Name="ProductID" />
  128. </Principal>
  129. <Dependent Role="ProductInOrder">
  130. <PropertyRef Name="IDProduct" />
  131. </Dependent>
  132. </ReferentialConstraint>
  133. </Association>
  134. <Association Name="FK_WorkShift_Cashier">
  135. <End Role="Cashier" Type="Self.Cashier" Multiplicity="1" />
  136. <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="*" />
  137. <ReferentialConstraint>
  138. <Principal Role="Cashier">
  139. <PropertyRef Name="CashierID" />
  140. </Principal>
  141. <Dependent Role="WorkShift">
  142. <PropertyRef Name="IDCashier" />
  143. </Dependent>
  144. </ReferentialConstraint>
  145. </Association>
  146. <Association Name="FK_WorkShift_Employee">
  147. <End Role="Employee" Type="Self.Employee" Multiplicity="1" />
  148. <End Role="WorkShift" Type="Self.WorkShift" Multiplicity="*" />
  149. <ReferentialConstraint>
  150. <Principal Role="Employee">
  151. <PropertyRef Name="EmployeeID" />
  152. </Principal>
  153. <Dependent Role="WorkShift">
  154. <PropertyRef Name="IDEmployee" />
  155. </Dependent>
  156. </ReferentialConstraint>
  157. </Association>
  158. <EntityContainer Name="gr672_pgvModelStoreContainer">
  159. <EntitySet Name="Cashier" EntityType="Self.Cashier" Schema="dbo" store:Type="Tables" />
  160. <EntitySet Name="Employee" EntityType="Self.Employee" Schema="dbo" store:Type="Tables" />
  161. <EntitySet Name="Order" EntityType="Self.Order" Schema="dbo" store:Type="Tables" />
  162. <EntitySet Name="PaymentMetod" EntityType="Self.PaymentMetod" Schema="dbo" store:Type="Tables" />
  163. <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
  164. <EntitySet Name="ProductInOrder" EntityType="Self.ProductInOrder" Schema="dbo" store:Type="Tables" />
  165. <EntitySet Name="Store" EntityType="Self.Store" Schema="dbo" store:Type="Tables" />
  166. <EntitySet Name="WorkShift" EntityType="Self.WorkShift" Schema="dbo" store:Type="Tables" />
  167. <AssociationSet Name="FK_Cashier_Store" Association="Self.FK_Cashier_Store">
  168. <End Role="Store" EntitySet="Store" />
  169. <End Role="Cashier" EntitySet="Cashier" />
  170. </AssociationSet>
  171. <AssociationSet Name="FK_Order_PaymentMetod" Association="Self.FK_Order_PaymentMetod">
  172. <End Role="PaymentMetod" EntitySet="PaymentMetod" />
  173. <End Role="Order" EntitySet="Order" />
  174. </AssociationSet>
  175. <AssociationSet Name="FK_Order_WorkShift" Association="Self.FK_Order_WorkShift">
  176. <End Role="WorkShift" EntitySet="WorkShift" />
  177. <End Role="Order" EntitySet="Order" />
  178. </AssociationSet>
  179. <AssociationSet Name="FK_ProductInOrder_Order" Association="Self.FK_ProductInOrder_Order">
  180. <End Role="Order" EntitySet="Order" />
  181. <End Role="ProductInOrder" EntitySet="ProductInOrder" />
  182. </AssociationSet>
  183. <AssociationSet Name="FK_ProductInOrder_Product" Association="Self.FK_ProductInOrder_Product">
  184. <End Role="Product" EntitySet="Product" />
  185. <End Role="ProductInOrder" EntitySet="ProductInOrder" />
  186. </AssociationSet>
  187. <AssociationSet Name="FK_WorkShift_Cashier" Association="Self.FK_WorkShift_Cashier">
  188. <End Role="Cashier" EntitySet="Cashier" />
  189. <End Role="WorkShift" EntitySet="WorkShift" />
  190. </AssociationSet>
  191. <AssociationSet Name="FK_WorkShift_Employee" Association="Self.FK_WorkShift_Employee">
  192. <End Role="Employee" EntitySet="Employee" />
  193. <End Role="WorkShift" EntitySet="WorkShift" />
  194. </AssociationSet>
  195. </EntityContainer>
  196. </Schema>