Model1.edmx 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  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="Хранилище KotkovaModel" 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="Order">
  9. <Key>
  10. <PropertyRef Name="OrderID" />
  11. </Key>
  12. <Property Name="OrderID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  13. <Property Name="OrderStatus" Type="nvarchar(max)" Nullable="false" />
  14. <Property Name="OrderDeliveryDate" Type="datetime" />
  15. <Property Name="OrderPickupPoint" Type="int" Nullable="false" />
  16. <Property Name="OrderDate" Type="datetime" Nullable="false" />
  17. <Property Name="OrderCode" Type="int" Nullable="false" />
  18. <Property Name="OrderClienr" Type="varchar" MaxLength="100" />
  19. </EntityType>
  20. <EntityType Name="OrderProduct">
  21. <Key>
  22. <PropertyRef Name="OrderProductId" />
  23. </Key>
  24. <Property Name="OrderProductId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  25. <Property Name="OrderID" Type="int" Nullable="false" />
  26. <Property Name="ProductArticleNumber" Type="nvarchar" MaxLength="100" Nullable="false" />
  27. <Property Name="ProductCount" Type="int" Nullable="false" />
  28. </EntityType>
  29. <EntityType Name="PickupPoint">
  30. <Key>
  31. <PropertyRef Name="PickupPointId" />
  32. </Key>
  33. <Property Name="PickupPointId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  34. <Property Name="PickupPointAdress" Type="varchar(max)" Nullable="false" />
  35. </EntityType>
  36. <EntityType Name="Product">
  37. <Key>
  38. <PropertyRef Name="ProductArticleNumber" />
  39. </Key>
  40. <Property Name="ProductArticleNumber" Type="nvarchar" MaxLength="100" Nullable="false" />
  41. <Property Name="ProductName" Type="nvarchar(max)" Nullable="false" />
  42. <Property Name="ProductDescription" Type="nvarchar(max)" Nullable="false" />
  43. <Property Name="CategoryId" Type="int" Nullable="false" />
  44. <Property Name="ProductPhoto" Type="image" />
  45. <Property Name="ManufacturerId" Type="int" Nullable="false" />
  46. <Property Name="ProductCost" Type="decimal" Precision="19" Scale="4" Nullable="false" />
  47. <Property Name="ProductDiscountAmount" Type="float" />
  48. <Property Name="ProductQuantityInStock" Type="int" Nullable="false" />
  49. <Property Name="ProductStatus" Type="nvarchar(max)" Nullable="false" />
  50. <Property Name="ProductDiscountMax" Type="float" Nullable="false" />
  51. <Property Name="SuplierId" Type="int" Nullable="false" />
  52. <Property Name="UnitId" Type="int" />
  53. </EntityType>
  54. <EntityType Name="ProductCategory">
  55. <Key>
  56. <PropertyRef Name="CategoryId" />
  57. </Key>
  58. <Property Name="CategoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  59. <Property Name="CategoryName" Type="varchar" MaxLength="100" Nullable="false" />
  60. </EntityType>
  61. <EntityType Name="ProductManufacturer">
  62. <Key>
  63. <PropertyRef Name="ManufacturerID" />
  64. </Key>
  65. <Property Name="ManufacturerID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  66. <Property Name="ManufacturerName" Type="varchar" MaxLength="100" Nullable="false" />
  67. </EntityType>
  68. <EntityType Name="ProductSuplier">
  69. <Key>
  70. <PropertyRef Name="SuplierId" />
  71. </Key>
  72. <Property Name="SuplierId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  73. <Property Name="SuplierName" Type="varchar" MaxLength="100" Nullable="false" />
  74. </EntityType>
  75. <EntityType Name="ProductUnit">
  76. <Key>
  77. <PropertyRef Name="UnitID" />
  78. </Key>
  79. <Property Name="UnitID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  80. <Property Name="UnitName" Type="varchar" MaxLength="50" Nullable="false" />
  81. </EntityType>
  82. <EntityType Name="Role">
  83. <Key>
  84. <PropertyRef Name="RoleID" />
  85. </Key>
  86. <Property Name="RoleID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  87. <Property Name="RoleName" Type="nvarchar" MaxLength="100" Nullable="false" />
  88. </EntityType>
  89. <EntityType Name="sysdiagrams">
  90. <Key>
  91. <PropertyRef Name="diagram_id" />
  92. </Key>
  93. <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
  94. <Property Name="principal_id" Type="int" Nullable="false" />
  95. <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  96. <Property Name="version" Type="int" />
  97. <Property Name="definition" Type="varbinary(max)" />
  98. </EntityType>
  99. <EntityType Name="User">
  100. <Key>
  101. <PropertyRef Name="UserID" />
  102. </Key>
  103. <Property Name="UserID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  104. <Property Name="UserSurname" Type="nvarchar" MaxLength="100" Nullable="false" />
  105. <Property Name="UserName" Type="nvarchar" MaxLength="100" Nullable="false" />
  106. <Property Name="UserPatronymic" Type="nvarchar" MaxLength="100" />
  107. <Property Name="UserLogin" Type="nvarchar(max)" Nullable="false" />
  108. <Property Name="UserPassword" Type="nvarchar(max)" Nullable="false" />
  109. <Property Name="UserRole" Type="int" Nullable="false" />
  110. </EntityType>
  111. <Association Name="FK__OrderProd__Order__403A8C7D">
  112. <End Role="Order" Type="Self.Order" Multiplicity="1" />
  113. <End Role="OrderProduct" Type="Self.OrderProduct" Multiplicity="*" />
  114. <ReferentialConstraint>
  115. <Principal Role="Order">
  116. <PropertyRef Name="OrderID" />
  117. </Principal>
  118. <Dependent Role="OrderProduct">
  119. <PropertyRef Name="OrderID" />
  120. </Dependent>
  121. </ReferentialConstraint>
  122. </Association>
  123. <Association Name="FK__OrderProd__Produ__412EB0B6">
  124. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  125. <End Role="OrderProduct" Type="Self.OrderProduct" Multiplicity="*" />
  126. <ReferentialConstraint>
  127. <Principal Role="Product">
  128. <PropertyRef Name="ProductArticleNumber" />
  129. </Principal>
  130. <Dependent Role="OrderProduct">
  131. <PropertyRef Name="ProductArticleNumber" />
  132. </Dependent>
  133. </ReferentialConstraint>
  134. </Association>
  135. <Association Name="FK__User__UserRole__398D8EEE">
  136. <End Role="Role" Type="Self.Role" Multiplicity="1" />
  137. <End Role="User" Type="Self.User" Multiplicity="*" />
  138. <ReferentialConstraint>
  139. <Principal Role="Role">
  140. <PropertyRef Name="RoleID" />
  141. </Principal>
  142. <Dependent Role="User">
  143. <PropertyRef Name="UserRole" />
  144. </Dependent>
  145. </ReferentialConstraint>
  146. </Association>
  147. <Association Name="FK_Order_PickupPoint">
  148. <End Role="PickupPoint" Type="Self.PickupPoint" Multiplicity="1" />
  149. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  150. <ReferentialConstraint>
  151. <Principal Role="PickupPoint">
  152. <PropertyRef Name="PickupPointId" />
  153. </Principal>
  154. <Dependent Role="Order">
  155. <PropertyRef Name="OrderPickupPoint" />
  156. </Dependent>
  157. </ReferentialConstraint>
  158. </Association>
  159. <Association Name="FK_Product_ProductCategory">
  160. <End Role="ProductCategory" Type="Self.ProductCategory" Multiplicity="1" />
  161. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  162. <ReferentialConstraint>
  163. <Principal Role="ProductCategory">
  164. <PropertyRef Name="CategoryId" />
  165. </Principal>
  166. <Dependent Role="Product">
  167. <PropertyRef Name="CategoryId" />
  168. </Dependent>
  169. </ReferentialConstraint>
  170. </Association>
  171. <Association Name="FK_Product_ProductManufacturer">
  172. <End Role="ProductManufacturer" Type="Self.ProductManufacturer" Multiplicity="1" />
  173. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  174. <ReferentialConstraint>
  175. <Principal Role="ProductManufacturer">
  176. <PropertyRef Name="ManufacturerID" />
  177. </Principal>
  178. <Dependent Role="Product">
  179. <PropertyRef Name="CategoryId" />
  180. </Dependent>
  181. </ReferentialConstraint>
  182. </Association>
  183. <Association Name="FK_Product_ProductSuplier">
  184. <End Role="ProductSuplier" Type="Self.ProductSuplier" Multiplicity="1" />
  185. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  186. <ReferentialConstraint>
  187. <Principal Role="ProductSuplier">
  188. <PropertyRef Name="SuplierId" />
  189. </Principal>
  190. <Dependent Role="Product">
  191. <PropertyRef Name="SuplierId" />
  192. </Dependent>
  193. </ReferentialConstraint>
  194. </Association>
  195. <Association Name="FK_Product_ProductUnit">
  196. <End Role="ProductUnit" Type="Self.ProductUnit" Multiplicity="0..1" />
  197. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  198. <ReferentialConstraint>
  199. <Principal Role="ProductUnit">
  200. <PropertyRef Name="UnitID" />
  201. </Principal>
  202. <Dependent Role="Product">
  203. <PropertyRef Name="UnitId" />
  204. </Dependent>
  205. </ReferentialConstraint>
  206. </Association>
  207. <EntityContainer Name="Хранилище KotkovaModelContainer">
  208. <EntitySet Name="Order" EntityType="Self.Order" Schema="dbo" store:Type="Tables" />
  209. <EntitySet Name="OrderProduct" EntityType="Self.OrderProduct" Schema="dbo" store:Type="Tables" />
  210. <EntitySet Name="PickupPoint" EntityType="Self.PickupPoint" Schema="dbo" store:Type="Tables" />
  211. <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
  212. <EntitySet Name="ProductCategory" EntityType="Self.ProductCategory" Schema="dbo" store:Type="Tables" />
  213. <EntitySet Name="ProductManufacturer" EntityType="Self.ProductManufacturer" Schema="dbo" store:Type="Tables" />
  214. <EntitySet Name="ProductSuplier" EntityType="Self.ProductSuplier" Schema="dbo" store:Type="Tables" />
  215. <EntitySet Name="ProductUnit" EntityType="Self.ProductUnit" Schema="dbo" store:Type="Tables" />
  216. <EntitySet Name="Role" EntityType="Self.Role" Schema="dbo" store:Type="Tables" />
  217. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
  218. <EntitySet Name="User" EntityType="Self.User" Schema="dbo" store:Type="Tables" />
  219. <AssociationSet Name="FK__OrderProd__Order__403A8C7D" Association="Self.FK__OrderProd__Order__403A8C7D">
  220. <End Role="Order" EntitySet="Order" />
  221. <End Role="OrderProduct" EntitySet="OrderProduct" />
  222. </AssociationSet>
  223. <AssociationSet Name="FK__OrderProd__Produ__412EB0B6" Association="Self.FK__OrderProd__Produ__412EB0B6">
  224. <End Role="Product" EntitySet="Product" />
  225. <End Role="OrderProduct" EntitySet="OrderProduct" />
  226. </AssociationSet>
  227. <AssociationSet Name="FK__User__UserRole__398D8EEE" Association="Self.FK__User__UserRole__398D8EEE">
  228. <End Role="Role" EntitySet="Role" />
  229. <End Role="User" EntitySet="User" />
  230. </AssociationSet>
  231. <AssociationSet Name="FK_Order_PickupPoint" Association="Self.FK_Order_PickupPoint">
  232. <End Role="PickupPoint" EntitySet="PickupPoint" />
  233. <End Role="Order" EntitySet="Order" />
  234. </AssociationSet>
  235. <AssociationSet Name="FK_Product_ProductCategory" Association="Self.FK_Product_ProductCategory">
  236. <End Role="ProductCategory" EntitySet="ProductCategory" />
  237. <End Role="Product" EntitySet="Product" />
  238. </AssociationSet>
  239. <AssociationSet Name="FK_Product_ProductManufacturer" Association="Self.FK_Product_ProductManufacturer">
  240. <End Role="ProductManufacturer" EntitySet="ProductManufacturer" />
  241. <End Role="Product" EntitySet="Product" />
  242. </AssociationSet>
  243. <AssociationSet Name="FK_Product_ProductSuplier" Association="Self.FK_Product_ProductSuplier">
  244. <End Role="ProductSuplier" EntitySet="ProductSuplier" />
  245. <End Role="Product" EntitySet="Product" />
  246. </AssociationSet>
  247. <AssociationSet Name="FK_Product_ProductUnit" Association="Self.FK_Product_ProductUnit">
  248. <End Role="ProductUnit" EntitySet="ProductUnit" />
  249. <End Role="Product" EntitySet="Product" />
  250. </AssociationSet>
  251. </EntityContainer>
  252. </Schema></edmx:StorageModels>
  253. <!-- CSDL content -->
  254. <edmx:ConceptualModels>
  255. <Schema Namespace="KotkovaModel" 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">
  256. <EntityType Name="Order">
  257. <Key>
  258. <PropertyRef Name="OrderID" />
  259. </Key>
  260. <Property Name="OrderID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  261. <Property Name="OrderStatus" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  262. <Property Name="OrderDeliveryDate" Type="DateTime" Precision="3" />
  263. <Property Name="OrderPickupPoint" Type="Int32" Nullable="false" />
  264. <Property Name="OrderDate" Type="DateTime" Nullable="false" Precision="3" />
  265. <Property Name="OrderCode" Type="Int32" Nullable="false" />
  266. <Property Name="OrderClienr" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
  267. <NavigationProperty Name="OrderProduct" Relationship="Self.FK__OrderProd__Order__403A8C7D" FromRole="Order" ToRole="OrderProduct" />
  268. <NavigationProperty Name="PickupPoint" Relationship="Self.FK_Order_PickupPoint" FromRole="Order" ToRole="PickupPoint" />
  269. </EntityType>
  270. <EntityType Name="OrderProduct">
  271. <Key>
  272. <PropertyRef Name="OrderProductId" />
  273. </Key>
  274. <Property Name="OrderProductId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  275. <Property Name="OrderID" Type="Int32" Nullable="false" />
  276. <Property Name="ProductArticleNumber" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  277. <Property Name="ProductCount" Type="Int32" Nullable="false" />
  278. <NavigationProperty Name="Order" Relationship="Self.FK__OrderProd__Order__403A8C7D" FromRole="OrderProduct" ToRole="Order" />
  279. <NavigationProperty Name="Product" Relationship="Self.FK__OrderProd__Produ__412EB0B6" FromRole="OrderProduct" ToRole="Product" />
  280. </EntityType>
  281. <EntityType Name="PickupPoint">
  282. <Key>
  283. <PropertyRef Name="PickupPointId" />
  284. </Key>
  285. <Property Name="PickupPointId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  286. <Property Name="PickupPointAdress" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" Nullable="false" />
  287. <NavigationProperty Name="Order" Relationship="Self.FK_Order_PickupPoint" FromRole="PickupPoint" ToRole="Order" />
  288. </EntityType>
  289. <EntityType Name="Product">
  290. <Key>
  291. <PropertyRef Name="ProductArticleNumber" />
  292. </Key>
  293. <Property Name="ProductArticleNumber" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  294. <Property Name="ProductName" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  295. <Property Name="ProductDescription" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  296. <Property Name="CategoryId" Type="Int32" Nullable="false" />
  297. <Property Name="ProductPhoto" Type="Binary" MaxLength="Max" FixedLength="false" />
  298. <Property Name="ManufacturerId" Type="Int32" Nullable="false" />
  299. <Property Name="ProductCost" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  300. <Property Name="ProductDiscountAmount" Type="Double" />
  301. <Property Name="ProductQuantityInStock" Type="Int32" Nullable="false" />
  302. <Property Name="ProductStatus" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  303. <Property Name="ProductDiscountMax" Type="Double" Nullable="false" />
  304. <Property Name="SuplierId" Type="Int32" Nullable="false" />
  305. <Property Name="UnitId" Type="Int32" />
  306. <NavigationProperty Name="OrderProduct" Relationship="Self.FK__OrderProd__Produ__412EB0B6" FromRole="Product" ToRole="OrderProduct" />
  307. <NavigationProperty Name="ProductCategory" Relationship="Self.FK_Product_ProductCategory" FromRole="Product" ToRole="ProductCategory" />
  308. <NavigationProperty Name="ProductManufacturer" Relationship="Self.FK_Product_ProductManufacturer" FromRole="Product" ToRole="ProductManufacturer" />
  309. <NavigationProperty Name="ProductSuplier" Relationship="Self.FK_Product_ProductSuplier" FromRole="Product" ToRole="ProductSuplier" />
  310. <NavigationProperty Name="ProductUnit" Relationship="Self.FK_Product_ProductUnit" FromRole="Product" ToRole="ProductUnit" />
  311. </EntityType>
  312. <EntityType Name="ProductCategory">
  313. <Key>
  314. <PropertyRef Name="CategoryId" />
  315. </Key>
  316. <Property Name="CategoryId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  317. <Property Name="CategoryName" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
  318. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductCategory" FromRole="ProductCategory" ToRole="Product" />
  319. </EntityType>
  320. <EntityType Name="ProductManufacturer">
  321. <Key>
  322. <PropertyRef Name="ManufacturerID" />
  323. </Key>
  324. <Property Name="ManufacturerID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  325. <Property Name="ManufacturerName" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
  326. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductManufacturer" FromRole="ProductManufacturer" ToRole="Product" />
  327. </EntityType>
  328. <EntityType Name="ProductSuplier">
  329. <Key>
  330. <PropertyRef Name="SuplierId" />
  331. </Key>
  332. <Property Name="SuplierId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  333. <Property Name="SuplierName" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
  334. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductSuplier" FromRole="ProductSuplier" ToRole="Product" />
  335. </EntityType>
  336. <EntityType Name="ProductUnit">
  337. <Key>
  338. <PropertyRef Name="UnitID" />
  339. </Key>
  340. <Property Name="UnitID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  341. <Property Name="UnitName" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
  342. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductUnit" FromRole="ProductUnit" ToRole="Product" />
  343. </EntityType>
  344. <EntityType Name="Role">
  345. <Key>
  346. <PropertyRef Name="RoleID" />
  347. </Key>
  348. <Property Name="RoleID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  349. <Property Name="RoleName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  350. <NavigationProperty Name="User" Relationship="Self.FK__User__UserRole__398D8EEE" FromRole="Role" ToRole="User" />
  351. </EntityType>
  352. <EntityType Name="sysdiagrams">
  353. <Key>
  354. <PropertyRef Name="diagram_id" />
  355. </Key>
  356. <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
  357. <Property Name="principal_id" Type="Int32" Nullable="false" />
  358. <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  359. <Property Name="version" Type="Int32" />
  360. <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
  361. </EntityType>
  362. <EntityType Name="User">
  363. <Key>
  364. <PropertyRef Name="UserID" />
  365. </Key>
  366. <Property Name="UserID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  367. <Property Name="UserSurname" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  368. <Property Name="UserName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  369. <Property Name="UserPatronymic" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  370. <Property Name="UserLogin" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  371. <Property Name="UserPassword" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  372. <Property Name="UserRole" Type="Int32" Nullable="false" />
  373. <NavigationProperty Name="Role" Relationship="Self.FK__User__UserRole__398D8EEE" FromRole="User" ToRole="Role" />
  374. </EntityType>
  375. <Association Name="FK__OrderProd__Order__403A8C7D">
  376. <End Role="Order" Type="Self.Order" Multiplicity="1" >
  377. <OnDelete Action="Cascade" />
  378. </End>
  379. <End Role="OrderProduct" Type="Self.OrderProduct" Multiplicity="*" />
  380. <ReferentialConstraint>
  381. <Principal Role="Order">
  382. <PropertyRef Name="OrderID" />
  383. </Principal>
  384. <Dependent Role="OrderProduct">
  385. <PropertyRef Name="OrderID" />
  386. </Dependent>
  387. </ReferentialConstraint>
  388. </Association>
  389. <Association Name="FK_Order_PickupPoint">
  390. <End Role="PickupPoint" Type="Self.PickupPoint" Multiplicity="1" />
  391. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  392. <ReferentialConstraint>
  393. <Principal Role="PickupPoint">
  394. <PropertyRef Name="PickupPointId" />
  395. </Principal>
  396. <Dependent Role="Order">
  397. <PropertyRef Name="OrderPickupPoint" />
  398. </Dependent>
  399. </ReferentialConstraint>
  400. </Association>
  401. <Association Name="FK__OrderProd__Produ__412EB0B6">
  402. <End Role="Product" Type="Self.Product" Multiplicity="1" >
  403. <OnDelete Action="Cascade" />
  404. </End>
  405. <End Role="OrderProduct" Type="Self.OrderProduct" Multiplicity="*" />
  406. <ReferentialConstraint>
  407. <Principal Role="Product">
  408. <PropertyRef Name="ProductArticleNumber" />
  409. </Principal>
  410. <Dependent Role="OrderProduct">
  411. <PropertyRef Name="ProductArticleNumber" />
  412. </Dependent>
  413. </ReferentialConstraint>
  414. </Association>
  415. <Association Name="FK_Product_ProductCategory">
  416. <End Role="ProductCategory" Type="Self.ProductCategory" Multiplicity="1" >
  417. <OnDelete Action="Cascade" />
  418. </End>
  419. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  420. <ReferentialConstraint>
  421. <Principal Role="ProductCategory">
  422. <PropertyRef Name="CategoryId" />
  423. </Principal>
  424. <Dependent Role="Product">
  425. <PropertyRef Name="CategoryId" />
  426. </Dependent>
  427. </ReferentialConstraint>
  428. </Association>
  429. <Association Name="FK_Product_ProductManufacturer">
  430. <End Role="ProductManufacturer" Type="Self.ProductManufacturer" Multiplicity="1" >
  431. <OnDelete Action="Cascade" />
  432. </End>
  433. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  434. <ReferentialConstraint>
  435. <Principal Role="ProductManufacturer">
  436. <PropertyRef Name="ManufacturerID" />
  437. </Principal>
  438. <Dependent Role="Product">
  439. <PropertyRef Name="CategoryId" />
  440. </Dependent>
  441. </ReferentialConstraint>
  442. </Association>
  443. <Association Name="FK_Product_ProductSuplier">
  444. <End Role="ProductSuplier" Type="Self.ProductSuplier" Multiplicity="1" >
  445. <OnDelete Action="Cascade" />
  446. </End>
  447. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  448. <ReferentialConstraint>
  449. <Principal Role="ProductSuplier">
  450. <PropertyRef Name="SuplierId" />
  451. </Principal>
  452. <Dependent Role="Product">
  453. <PropertyRef Name="SuplierId" />
  454. </Dependent>
  455. </ReferentialConstraint>
  456. </Association>
  457. <Association Name="FK_Product_ProductUnit">
  458. <End Role="ProductUnit" Type="Self.ProductUnit" Multiplicity="0..1" >
  459. <OnDelete Action="Cascade" />
  460. </End>
  461. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  462. <ReferentialConstraint>
  463. <Principal Role="ProductUnit">
  464. <PropertyRef Name="UnitID" />
  465. </Principal>
  466. <Dependent Role="Product">
  467. <PropertyRef Name="UnitId" />
  468. </Dependent>
  469. </ReferentialConstraint>
  470. </Association>
  471. <Association Name="FK__User__UserRole__398D8EEE">
  472. <End Role="Role" Type="Self.Role" Multiplicity="1" />
  473. <End Role="User" Type="Self.User" Multiplicity="*" />
  474. <ReferentialConstraint>
  475. <Principal Role="Role">
  476. <PropertyRef Name="RoleID" />
  477. </Principal>
  478. <Dependent Role="User">
  479. <PropertyRef Name="UserRole" />
  480. </Dependent>
  481. </ReferentialConstraint>
  482. </Association>
  483. <EntityContainer Name="KotBase" annotation:LazyLoadingEnabled="true">
  484. <EntitySet Name="Order" EntityType="Self.Order" />
  485. <EntitySet Name="OrderProduct" EntityType="Self.OrderProduct" />
  486. <EntitySet Name="PickupPoint" EntityType="Self.PickupPoint" />
  487. <EntitySet Name="Product" EntityType="Self.Product" />
  488. <EntitySet Name="ProductCategory" EntityType="Self.ProductCategory" />
  489. <EntitySet Name="ProductManufacturer" EntityType="Self.ProductManufacturer" />
  490. <EntitySet Name="ProductSuplier" EntityType="Self.ProductSuplier" />
  491. <EntitySet Name="ProductUnit" EntityType="Self.ProductUnit" />
  492. <EntitySet Name="Role" EntityType="Self.Role" />
  493. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
  494. <EntitySet Name="User" EntityType="Self.User" />
  495. <AssociationSet Name="FK__OrderProd__Order__403A8C7D" Association="Self.FK__OrderProd__Order__403A8C7D">
  496. <End Role="Order" EntitySet="Order" />
  497. <End Role="OrderProduct" EntitySet="OrderProduct" />
  498. </AssociationSet>
  499. <AssociationSet Name="FK_Order_PickupPoint" Association="Self.FK_Order_PickupPoint">
  500. <End Role="PickupPoint" EntitySet="PickupPoint" />
  501. <End Role="Order" EntitySet="Order" />
  502. </AssociationSet>
  503. <AssociationSet Name="FK__OrderProd__Produ__412EB0B6" Association="Self.FK__OrderProd__Produ__412EB0B6">
  504. <End Role="Product" EntitySet="Product" />
  505. <End Role="OrderProduct" EntitySet="OrderProduct" />
  506. </AssociationSet>
  507. <AssociationSet Name="FK_Product_ProductCategory" Association="Self.FK_Product_ProductCategory">
  508. <End Role="ProductCategory" EntitySet="ProductCategory" />
  509. <End Role="Product" EntitySet="Product" />
  510. </AssociationSet>
  511. <AssociationSet Name="FK_Product_ProductManufacturer" Association="Self.FK_Product_ProductManufacturer">
  512. <End Role="ProductManufacturer" EntitySet="ProductManufacturer" />
  513. <End Role="Product" EntitySet="Product" />
  514. </AssociationSet>
  515. <AssociationSet Name="FK_Product_ProductSuplier" Association="Self.FK_Product_ProductSuplier">
  516. <End Role="ProductSuplier" EntitySet="ProductSuplier" />
  517. <End Role="Product" EntitySet="Product" />
  518. </AssociationSet>
  519. <AssociationSet Name="FK_Product_ProductUnit" Association="Self.FK_Product_ProductUnit">
  520. <End Role="ProductUnit" EntitySet="ProductUnit" />
  521. <End Role="Product" EntitySet="Product" />
  522. </AssociationSet>
  523. <AssociationSet Name="FK__User__UserRole__398D8EEE" Association="Self.FK__User__UserRole__398D8EEE">
  524. <End Role="Role" EntitySet="Role" />
  525. <End Role="User" EntitySet="User" />
  526. </AssociationSet>
  527. </EntityContainer>
  528. </Schema>
  529. </edmx:ConceptualModels>
  530. <!-- C-S mapping content -->
  531. <edmx:Mappings>
  532. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  533. <EntityContainerMapping StorageEntityContainer="Хранилище KotkovaModelContainer" CdmEntityContainer="KotBase">
  534. <EntitySetMapping Name="Order">
  535. <EntityTypeMapping TypeName="KotkovaModel.Order">
  536. <MappingFragment StoreEntitySet="Order">
  537. <ScalarProperty Name="OrderID" ColumnName="OrderID" />
  538. <ScalarProperty Name="OrderStatus" ColumnName="OrderStatus" />
  539. <ScalarProperty Name="OrderDeliveryDate" ColumnName="OrderDeliveryDate" />
  540. <ScalarProperty Name="OrderPickupPoint" ColumnName="OrderPickupPoint" />
  541. <ScalarProperty Name="OrderDate" ColumnName="OrderDate" />
  542. <ScalarProperty Name="OrderCode" ColumnName="OrderCode" />
  543. <ScalarProperty Name="OrderClienr" ColumnName="OrderClienr" />
  544. </MappingFragment>
  545. </EntityTypeMapping>
  546. </EntitySetMapping>
  547. <EntitySetMapping Name="OrderProduct">
  548. <EntityTypeMapping TypeName="KotkovaModel.OrderProduct">
  549. <MappingFragment StoreEntitySet="OrderProduct">
  550. <ScalarProperty Name="OrderProductId" ColumnName="OrderProductId" />
  551. <ScalarProperty Name="OrderID" ColumnName="OrderID" />
  552. <ScalarProperty Name="ProductArticleNumber" ColumnName="ProductArticleNumber" />
  553. <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
  554. </MappingFragment>
  555. </EntityTypeMapping>
  556. </EntitySetMapping>
  557. <EntitySetMapping Name="PickupPoint">
  558. <EntityTypeMapping TypeName="KotkovaModel.PickupPoint">
  559. <MappingFragment StoreEntitySet="PickupPoint">
  560. <ScalarProperty Name="PickupPointId" ColumnName="PickupPointId" />
  561. <ScalarProperty Name="PickupPointAdress" ColumnName="PickupPointAdress" />
  562. </MappingFragment>
  563. </EntityTypeMapping>
  564. </EntitySetMapping>
  565. <EntitySetMapping Name="Product">
  566. <EntityTypeMapping TypeName="KotkovaModel.Product">
  567. <MappingFragment StoreEntitySet="Product">
  568. <ScalarProperty Name="ProductArticleNumber" ColumnName="ProductArticleNumber" />
  569. <ScalarProperty Name="ProductName" ColumnName="ProductName" />
  570. <ScalarProperty Name="ProductDescription" ColumnName="ProductDescription" />
  571. <ScalarProperty Name="CategoryId" ColumnName="CategoryId" />
  572. <ScalarProperty Name="ProductPhoto" ColumnName="ProductPhoto" />
  573. <ScalarProperty Name="ManufacturerId" ColumnName="ManufacturerId" />
  574. <ScalarProperty Name="ProductCost" ColumnName="ProductCost" />
  575. <ScalarProperty Name="ProductDiscountAmount" ColumnName="ProductDiscountAmount" />
  576. <ScalarProperty Name="ProductQuantityInStock" ColumnName="ProductQuantityInStock" />
  577. <ScalarProperty Name="ProductStatus" ColumnName="ProductStatus" />
  578. <ScalarProperty Name="ProductDiscountMax" ColumnName="ProductDiscountMax" />
  579. <ScalarProperty Name="SuplierId" ColumnName="SuplierId" />
  580. <ScalarProperty Name="UnitId" ColumnName="UnitId" />
  581. </MappingFragment>
  582. </EntityTypeMapping>
  583. </EntitySetMapping>
  584. <EntitySetMapping Name="ProductCategory">
  585. <EntityTypeMapping TypeName="KotkovaModel.ProductCategory">
  586. <MappingFragment StoreEntitySet="ProductCategory">
  587. <ScalarProperty Name="CategoryId" ColumnName="CategoryId" />
  588. <ScalarProperty Name="CategoryName" ColumnName="CategoryName" />
  589. </MappingFragment>
  590. </EntityTypeMapping>
  591. </EntitySetMapping>
  592. <EntitySetMapping Name="ProductManufacturer">
  593. <EntityTypeMapping TypeName="KotkovaModel.ProductManufacturer">
  594. <MappingFragment StoreEntitySet="ProductManufacturer">
  595. <ScalarProperty Name="ManufacturerID" ColumnName="ManufacturerID" />
  596. <ScalarProperty Name="ManufacturerName" ColumnName="ManufacturerName" />
  597. </MappingFragment>
  598. </EntityTypeMapping>
  599. </EntitySetMapping>
  600. <EntitySetMapping Name="ProductSuplier">
  601. <EntityTypeMapping TypeName="KotkovaModel.ProductSuplier">
  602. <MappingFragment StoreEntitySet="ProductSuplier">
  603. <ScalarProperty Name="SuplierId" ColumnName="SuplierId" />
  604. <ScalarProperty Name="SuplierName" ColumnName="SuplierName" />
  605. </MappingFragment>
  606. </EntityTypeMapping>
  607. </EntitySetMapping>
  608. <EntitySetMapping Name="ProductUnit">
  609. <EntityTypeMapping TypeName="KotkovaModel.ProductUnit">
  610. <MappingFragment StoreEntitySet="ProductUnit">
  611. <ScalarProperty Name="UnitID" ColumnName="UnitID" />
  612. <ScalarProperty Name="UnitName" ColumnName="UnitName" />
  613. </MappingFragment>
  614. </EntityTypeMapping>
  615. </EntitySetMapping>
  616. <EntitySetMapping Name="Role">
  617. <EntityTypeMapping TypeName="KotkovaModel.Role">
  618. <MappingFragment StoreEntitySet="Role">
  619. <ScalarProperty Name="RoleID" ColumnName="RoleID" />
  620. <ScalarProperty Name="RoleName" ColumnName="RoleName" />
  621. </MappingFragment>
  622. </EntityTypeMapping>
  623. </EntitySetMapping>
  624. <EntitySetMapping Name="sysdiagrams">
  625. <EntityTypeMapping TypeName="KotkovaModel.sysdiagrams">
  626. <MappingFragment StoreEntitySet="sysdiagrams">
  627. <ScalarProperty Name="name" ColumnName="name" />
  628. <ScalarProperty Name="principal_id" ColumnName="principal_id" />
  629. <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
  630. <ScalarProperty Name="version" ColumnName="version" />
  631. <ScalarProperty Name="definition" ColumnName="definition" />
  632. </MappingFragment>
  633. </EntityTypeMapping>
  634. </EntitySetMapping>
  635. <EntitySetMapping Name="User">
  636. <EntityTypeMapping TypeName="KotkovaModel.User">
  637. <MappingFragment StoreEntitySet="User">
  638. <ScalarProperty Name="UserID" ColumnName="UserID" />
  639. <ScalarProperty Name="UserSurname" ColumnName="UserSurname" />
  640. <ScalarProperty Name="UserName" ColumnName="UserName" />
  641. <ScalarProperty Name="UserPatronymic" ColumnName="UserPatronymic" />
  642. <ScalarProperty Name="UserLogin" ColumnName="UserLogin" />
  643. <ScalarProperty Name="UserPassword" ColumnName="UserPassword" />
  644. <ScalarProperty Name="UserRole" ColumnName="UserRole" />
  645. </MappingFragment>
  646. </EntityTypeMapping>
  647. </EntitySetMapping>
  648. </EntityContainerMapping>
  649. </Mapping>
  650. </edmx:Mappings>
  651. </edmx:Runtime>
  652. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  653. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  654. <Connection>
  655. <DesignerInfoPropertySet>
  656. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  657. </DesignerInfoPropertySet>
  658. </Connection>
  659. <Options>
  660. <DesignerInfoPropertySet>
  661. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  662. <DesignerProperty Name="EnablePluralization" Value="false" />
  663. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  664. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  665. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  666. </DesignerInfoPropertySet>
  667. </Options>
  668. <!-- Diagram content (shape and connector positions) -->
  669. <Diagrams></Diagrams>
  670. </Designer>
  671. </edmx:Edmx>