Model1.ssdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="Хранилище gr606_sosanModel" Provider="System.Data.SqlClient" ProviderManifestToken="2008" 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/02/edm/ssdl">
  3. <EntityType Name="Address">
  4. <Key>
  5. <PropertyRef Name="IdAddress" />
  6. </Key>
  7. <Property Name="IdAddress" Type="int" Nullable="false" />
  8. <Property Name="Street" Type="nvarchar" MaxLength="100" Nullable="false" />
  9. <Property Name="Number" Type="int" Nullable="false" />
  10. <Property Name="HouseNumber" Type="int" Nullable="false" />
  11. <Property Name="Flat" Type="int" Nullable="false" />
  12. <Property Name="IdEmployee" Type="int" />
  13. </EntityType>
  14. <EntityType Name="CardAmount">
  15. <Key>
  16. <PropertyRef Name="IdCard" />
  17. </Key>
  18. <Property Name="IdCard" Type="int" Nullable="false" />
  19. <Property Name="Sum" Type="money" />
  20. <Property Name="PaymentName" Type="nvarchar" MaxLength="50" />
  21. <Property Name="IdPay" Type="int" />
  22. </EntityType>
  23. <EntityType Name="Cash">
  24. <Key>
  25. <PropertyRef Name="IdCash" />
  26. </Key>
  27. <Property Name="IdCash" Type="int" Nullable="false" />
  28. <Property Name="Sum" Type="money" />
  29. <Property Name="PaymentName" Type="nvarchar" MaxLength="50" />
  30. <Property Name="IdPay" Type="int" />
  31. </EntityType>
  32. <EntityType Name="CashRegister">
  33. <Key>
  34. <PropertyRef Name="IdCashRegistre" />
  35. </Key>
  36. <Property Name="IdCashRegistre" Type="int" Nullable="false" />
  37. <Property Name="IdEmployee" Type="int" />
  38. <Property Name="IdProduct" Type="int" />
  39. <Property Name="IdSurrender" Type="int" />
  40. <Property Name="IdDate" Type="int" />
  41. <Property Name="IdPay" Type="int" />
  42. </EntityType>
  43. <EntityType Name="Dates">
  44. <Key>
  45. <PropertyRef Name="IdDate" />
  46. </Key>
  47. <Property Name="IdDate" Type="int" Nullable="false" />
  48. <Property Name="Date" Type="date" />
  49. </EntityType>
  50. <EntityType Name="Employees">
  51. <Key>
  52. <PropertyRef Name="IdEmployee" />
  53. </Key>
  54. <Property Name="IdEmployee" Type="int" Nullable="false" />
  55. <Property Name="Surname" Type="nvarchar" MaxLength="100" Nullable="false" />
  56. <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
  57. <Property Name="Patronymic" Type="nvarchar" MaxLength="100" Nullable="false" />
  58. <Property Name="TelephoneNumber" Type="nvarchar" MaxLength="20" Nullable="false" />
  59. <Property Name="Email" Type="nvarchar" MaxLength="50" Nullable="false" />
  60. <Property Name="Login" Type="nvarchar" MaxLength="20" Nullable="false" />
  61. <Property Name="Password" Type="nvarchar" MaxLength="20" Nullable="false" />
  62. </EntityType>
  63. <EntityType Name="PasportDetails">
  64. <Key>
  65. <PropertyRef Name="IdDetail" />
  66. </Key>
  67. <Property Name="IdDetail" Type="int" Nullable="false" />
  68. <Property Name="Number" Type="int" Nullable="false" />
  69. <Property Name="Series" Type="int" Nullable="false" />
  70. <Property Name="IssuedBy" Type="nvarchar" MaxLength="150" Nullable="false" />
  71. <Property Name="IdEmployee" Type="int" />
  72. </EntityType>
  73. <EntityType Name="Payment">
  74. <Key>
  75. <PropertyRef Name="IdPay" />
  76. </Key>
  77. <Property Name="IdPay" Type="int" Nullable="false" />
  78. <Property Name="HistoryAboutPayment" Type="nvarchar" MaxLength="255" />
  79. </EntityType>
  80. <EntityType Name="Product">
  81. <Key>
  82. <PropertyRef Name="IdProduct" />
  83. </Key>
  84. <Property Name="IdProduct" Type="int" Nullable="false" />
  85. <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
  86. <Property Name="Manufacture" Type="nvarchar" MaxLength="255" Nullable="false" />
  87. <Property Name="ProductGroup" Type="nvarchar" MaxLength="255" Nullable="false" />
  88. <Property Name="Cost" Type="money" Nullable="false" />
  89. <Property Name="TypeOfProduct" Type="nvarchar" MaxLength="100" Nullable="false" />
  90. <Property Name="Bardcode" Type="int" Nullable="false" />
  91. <Property Name="Margin" Type="money" Nullable="false" />
  92. <Property Name="Quantity" Type="int" Nullable="false" />
  93. <Property Name="Discount" Type="money" Nullable="false" />
  94. <Property Name="Unit" Type="nvarchar" MaxLength="50" Nullable="false" />
  95. <Property Name="VAT" Type="money" />
  96. </EntityType>
  97. <EntityType Name="Revenue">
  98. <Key>
  99. <PropertyRef Name="IdRevenue" />
  100. </Key>
  101. <Property Name="IdRevenue" Type="int" Nullable="false" />
  102. <Property Name="SumRevenue" Type="money" />
  103. <Property Name="IdEmployee" Type="int" />
  104. </EntityType>
  105. <EntityType Name="SuppliersProduct">
  106. <Key>
  107. <PropertyRef Name="IdSupplier" />
  108. </Key>
  109. <Property Name="IdSupplier" Type="int" Nullable="false" />
  110. <Property Name="CompanyName" Type="nvarchar" MaxLength="255" Nullable="false" />
  111. <Property Name="IdSupply" Type="int" Nullable="false" />
  112. </EntityType>
  113. <EntityType Name="SupplyProduct">
  114. <Key>
  115. <PropertyRef Name="IdSupply" />
  116. </Key>
  117. <Property Name="IdSupply" Type="int" Nullable="false" />
  118. <Property Name="QuantityDeliveredProduct" Type="int" Nullable="false" />
  119. <Property Name="CostDeliveredProduct" Type="money" Nullable="false" />
  120. <Property Name="IdProduct" Type="int" Nullable="false" />
  121. </EntityType>
  122. <EntityType Name="SurrenderOfMoney">
  123. <Key>
  124. <PropertyRef Name="IdSurrender" />
  125. </Key>
  126. <Property Name="IdSurrender" Type="int" Nullable="false" />
  127. <Property Name="Sum" Type="money" />
  128. <Property Name="NumberOfChecks" Type="int" />
  129. </EntityType>
  130. <EntityType Name="WorkingShift">
  131. <Key>
  132. <PropertyRef Name="IdShift" />
  133. </Key>
  134. <Property Name="IdShift" Type="int" Nullable="false" />
  135. <Property Name="NameShift" Type="nvarchar" MaxLength="100" Nullable="false" />
  136. <Property Name="IdEmployee" Type="int" />
  137. </EntityType>
  138. <Association Name="FK_Address_Employees">
  139. <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
  140. <End Role="Address" Type="Self.Address" Multiplicity="*" />
  141. <ReferentialConstraint>
  142. <Principal Role="Employees">
  143. <PropertyRef Name="IdEmployee" />
  144. </Principal>
  145. <Dependent Role="Address">
  146. <PropertyRef Name="IdEmployee" />
  147. </Dependent>
  148. </ReferentialConstraint>
  149. </Association>
  150. <Association Name="FK_CardAmount_Payment">
  151. <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
  152. <End Role="CardAmount" Type="Self.CardAmount" Multiplicity="*" />
  153. <ReferentialConstraint>
  154. <Principal Role="Payment">
  155. <PropertyRef Name="IdPay" />
  156. </Principal>
  157. <Dependent Role="CardAmount">
  158. <PropertyRef Name="IdPay" />
  159. </Dependent>
  160. </ReferentialConstraint>
  161. </Association>
  162. <Association Name="FK_Cash_Payment">
  163. <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
  164. <End Role="Cash" Type="Self.Cash" Multiplicity="*" />
  165. <ReferentialConstraint>
  166. <Principal Role="Payment">
  167. <PropertyRef Name="IdPay" />
  168. </Principal>
  169. <Dependent Role="Cash">
  170. <PropertyRef Name="IdPay" />
  171. </Dependent>
  172. </ReferentialConstraint>
  173. </Association>
  174. <Association Name="FK_CashRegister_Dates">
  175. <End Role="Dates" Type="Self.Dates" Multiplicity="0..1" />
  176. <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
  177. <ReferentialConstraint>
  178. <Principal Role="Dates">
  179. <PropertyRef Name="IdDate" />
  180. </Principal>
  181. <Dependent Role="CashRegister">
  182. <PropertyRef Name="IdDate" />
  183. </Dependent>
  184. </ReferentialConstraint>
  185. </Association>
  186. <Association Name="FK_CashRegister_Employees">
  187. <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
  188. <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
  189. <ReferentialConstraint>
  190. <Principal Role="Employees">
  191. <PropertyRef Name="IdEmployee" />
  192. </Principal>
  193. <Dependent Role="CashRegister">
  194. <PropertyRef Name="IdEmployee" />
  195. </Dependent>
  196. </ReferentialConstraint>
  197. </Association>
  198. <Association Name="FK_CashRegister_Payment">
  199. <End Role="Payment" Type="Self.Payment" Multiplicity="0..1" />
  200. <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
  201. <ReferentialConstraint>
  202. <Principal Role="Payment">
  203. <PropertyRef Name="IdPay" />
  204. </Principal>
  205. <Dependent Role="CashRegister">
  206. <PropertyRef Name="IdPay" />
  207. </Dependent>
  208. </ReferentialConstraint>
  209. </Association>
  210. <Association Name="FK_CashRegister_Product">
  211. <End Role="Product" Type="Self.Product" Multiplicity="0..1" />
  212. <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
  213. <ReferentialConstraint>
  214. <Principal Role="Product">
  215. <PropertyRef Name="IdProduct" />
  216. </Principal>
  217. <Dependent Role="CashRegister">
  218. <PropertyRef Name="IdProduct" />
  219. </Dependent>
  220. </ReferentialConstraint>
  221. </Association>
  222. <Association Name="FK_CashRegister_SurrenderOfMoney">
  223. <End Role="SurrenderOfMoney" Type="Self.SurrenderOfMoney" Multiplicity="0..1" />
  224. <End Role="CashRegister" Type="Self.CashRegister" Multiplicity="*" />
  225. <ReferentialConstraint>
  226. <Principal Role="SurrenderOfMoney">
  227. <PropertyRef Name="IdSurrender" />
  228. </Principal>
  229. <Dependent Role="CashRegister">
  230. <PropertyRef Name="IdSurrender" />
  231. </Dependent>
  232. </ReferentialConstraint>
  233. </Association>
  234. <Association Name="FK_PasportDetails_Employees">
  235. <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
  236. <End Role="PasportDetails" Type="Self.PasportDetails" Multiplicity="*" />
  237. <ReferentialConstraint>
  238. <Principal Role="Employees">
  239. <PropertyRef Name="IdEmployee" />
  240. </Principal>
  241. <Dependent Role="PasportDetails">
  242. <PropertyRef Name="IdEmployee" />
  243. </Dependent>
  244. </ReferentialConstraint>
  245. </Association>
  246. <Association Name="FK_Revenue_Employees">
  247. <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
  248. <End Role="Revenue" Type="Self.Revenue" Multiplicity="*" />
  249. <ReferentialConstraint>
  250. <Principal Role="Employees">
  251. <PropertyRef Name="IdEmployee" />
  252. </Principal>
  253. <Dependent Role="Revenue">
  254. <PropertyRef Name="IdEmployee" />
  255. </Dependent>
  256. </ReferentialConstraint>
  257. </Association>
  258. <Association Name="FK_SuppliersProduct_SupplyProduct">
  259. <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="1" />
  260. <End Role="SuppliersProduct" Type="Self.SuppliersProduct" Multiplicity="*" />
  261. <ReferentialConstraint>
  262. <Principal Role="SupplyProduct">
  263. <PropertyRef Name="IdSupply" />
  264. </Principal>
  265. <Dependent Role="SuppliersProduct">
  266. <PropertyRef Name="IdSupply" />
  267. </Dependent>
  268. </ReferentialConstraint>
  269. </Association>
  270. <Association Name="FK_SupplyProduct_Product">
  271. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  272. <End Role="SupplyProduct" Type="Self.SupplyProduct" Multiplicity="*" />
  273. <ReferentialConstraint>
  274. <Principal Role="Product">
  275. <PropertyRef Name="IdProduct" />
  276. </Principal>
  277. <Dependent Role="SupplyProduct">
  278. <PropertyRef Name="IdProduct" />
  279. </Dependent>
  280. </ReferentialConstraint>
  281. </Association>
  282. <Association Name="FK_WorkingShift_Employees">
  283. <End Role="Employees" Type="Self.Employees" Multiplicity="0..1" />
  284. <End Role="WorkingShift" Type="Self.WorkingShift" Multiplicity="*" />
  285. <ReferentialConstraint>
  286. <Principal Role="Employees">
  287. <PropertyRef Name="IdEmployee" />
  288. </Principal>
  289. <Dependent Role="WorkingShift">
  290. <PropertyRef Name="IdEmployee" />
  291. </Dependent>
  292. </ReferentialConstraint>
  293. </Association>
  294. <EntityContainer Name="Хранилище gr606_sosanModelContainer">
  295. <EntitySet Name="Address" EntityType="Self.Address" Schema="dbo" store:Type="Tables" />
  296. <EntitySet Name="CardAmount" EntityType="Self.CardAmount" Schema="dbo" store:Type="Tables" />
  297. <EntitySet Name="Cash" EntityType="Self.Cash" Schema="dbo" store:Type="Tables" />
  298. <EntitySet Name="CashRegister" EntityType="Self.CashRegister" Schema="dbo" store:Type="Tables" />
  299. <EntitySet Name="Dates" EntityType="Self.Dates" Schema="dbo" store:Type="Tables" />
  300. <EntitySet Name="Employees" EntityType="Self.Employees" Schema="dbo" store:Type="Tables" />
  301. <EntitySet Name="PasportDetails" EntityType="Self.PasportDetails" Schema="dbo" store:Type="Tables" />
  302. <EntitySet Name="Payment" EntityType="Self.Payment" Schema="dbo" store:Type="Tables" />
  303. <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
  304. <EntitySet Name="Revenue" EntityType="Self.Revenue" Schema="dbo" store:Type="Tables" />
  305. <EntitySet Name="SuppliersProduct" EntityType="Self.SuppliersProduct" Schema="dbo" store:Type="Tables" />
  306. <EntitySet Name="SupplyProduct" EntityType="Self.SupplyProduct" Schema="dbo" store:Type="Tables" />
  307. <EntitySet Name="SurrenderOfMoney" EntityType="Self.SurrenderOfMoney" Schema="dbo" store:Type="Tables" />
  308. <EntitySet Name="WorkingShift" EntityType="Self.WorkingShift" Schema="dbo" store:Type="Tables" />
  309. <AssociationSet Name="FK_Address_Employees" Association="Self.FK_Address_Employees">
  310. <End Role="Employees" EntitySet="Employees" />
  311. <End Role="Address" EntitySet="Address" />
  312. </AssociationSet>
  313. <AssociationSet Name="FK_CardAmount_Payment" Association="Self.FK_CardAmount_Payment">
  314. <End Role="Payment" EntitySet="Payment" />
  315. <End Role="CardAmount" EntitySet="CardAmount" />
  316. </AssociationSet>
  317. <AssociationSet Name="FK_Cash_Payment" Association="Self.FK_Cash_Payment">
  318. <End Role="Payment" EntitySet="Payment" />
  319. <End Role="Cash" EntitySet="Cash" />
  320. </AssociationSet>
  321. <AssociationSet Name="FK_CashRegister_Dates" Association="Self.FK_CashRegister_Dates">
  322. <End Role="Dates" EntitySet="Dates" />
  323. <End Role="CashRegister" EntitySet="CashRegister" />
  324. </AssociationSet>
  325. <AssociationSet Name="FK_CashRegister_Employees" Association="Self.FK_CashRegister_Employees">
  326. <End Role="Employees" EntitySet="Employees" />
  327. <End Role="CashRegister" EntitySet="CashRegister" />
  328. </AssociationSet>
  329. <AssociationSet Name="FK_CashRegister_Payment" Association="Self.FK_CashRegister_Payment">
  330. <End Role="Payment" EntitySet="Payment" />
  331. <End Role="CashRegister" EntitySet="CashRegister" />
  332. </AssociationSet>
  333. <AssociationSet Name="FK_CashRegister_Product" Association="Self.FK_CashRegister_Product">
  334. <End Role="Product" EntitySet="Product" />
  335. <End Role="CashRegister" EntitySet="CashRegister" />
  336. </AssociationSet>
  337. <AssociationSet Name="FK_CashRegister_SurrenderOfMoney" Association="Self.FK_CashRegister_SurrenderOfMoney">
  338. <End Role="SurrenderOfMoney" EntitySet="SurrenderOfMoney" />
  339. <End Role="CashRegister" EntitySet="CashRegister" />
  340. </AssociationSet>
  341. <AssociationSet Name="FK_PasportDetails_Employees" Association="Self.FK_PasportDetails_Employees">
  342. <End Role="Employees" EntitySet="Employees" />
  343. <End Role="PasportDetails" EntitySet="PasportDetails" />
  344. </AssociationSet>
  345. <AssociationSet Name="FK_Revenue_Employees" Association="Self.FK_Revenue_Employees">
  346. <End Role="Employees" EntitySet="Employees" />
  347. <End Role="Revenue" EntitySet="Revenue" />
  348. </AssociationSet>
  349. <AssociationSet Name="FK_SuppliersProduct_SupplyProduct" Association="Self.FK_SuppliersProduct_SupplyProduct">
  350. <End Role="SupplyProduct" EntitySet="SupplyProduct" />
  351. <End Role="SuppliersProduct" EntitySet="SuppliersProduct" />
  352. </AssociationSet>
  353. <AssociationSet Name="FK_SupplyProduct_Product" Association="Self.FK_SupplyProduct_Product">
  354. <End Role="Product" EntitySet="Product" />
  355. <End Role="SupplyProduct" EntitySet="SupplyProduct" />
  356. </AssociationSet>
  357. <AssociationSet Name="FK_WorkingShift_Employees" Association="Self.FK_WorkingShift_Employees">
  358. <End Role="Employees" EntitySet="Employees" />
  359. <End Role="WorkingShift" EntitySet="WorkingShift" />
  360. </AssociationSet>
  361. </EntityContainer>
  362. </Schema>