Model.edmx 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  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" Nullable="false" />
  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="ProdectDiscountMax" Type="tinyint" 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>
  253. </edmx:StorageModels>
  254. <!-- CSDL content -->
  255. <edmx:ConceptualModels>
  256. <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">
  257. <EntityType Name="Order">
  258. <Key>
  259. <PropertyRef Name="OrderID" />
  260. </Key>
  261. <Property Name="OrderID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  262. <Property Name="OrderStatus" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  263. <Property Name="OrderDeliveryDate" Type="DateTime" Nullable="false" Precision="3" />
  264. <Property Name="OrderPickupPoint" Type="Int32" Nullable="false" />
  265. <Property Name="OrderDate" Type="DateTime" Nullable="false" Precision="3" />
  266. <Property Name="OrderCode" Type="Int32" Nullable="false" />
  267. <Property Name="OrderClienr" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
  268. <NavigationProperty Name="OrderProduct" Relationship="Self.FK__OrderProd__Order__403A8C7D" FromRole="Order" ToRole="OrderProduct" />
  269. <NavigationProperty Name="PickupPoint" Relationship="Self.FK_Order_PickupPoint" FromRole="Order" ToRole="PickupPoint" />
  270. </EntityType>
  271. <EntityType Name="OrderProduct">
  272. <Key>
  273. <PropertyRef Name="OrderProductId" />
  274. </Key>
  275. <Property Name="OrderProductId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  276. <Property Name="OrderID" Type="Int32" Nullable="false" />
  277. <Property Name="ProductArticleNumber" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  278. <Property Name="ProductCount" Type="Int32" Nullable="false" />
  279. <NavigationProperty Name="Order" Relationship="Self.FK__OrderProd__Order__403A8C7D" FromRole="OrderProduct" ToRole="Order" />
  280. <NavigationProperty Name="Product" Relationship="Self.FK__OrderProd__Produ__412EB0B6" FromRole="OrderProduct" ToRole="Product" />
  281. </EntityType>
  282. <EntityType Name="PickupPoint">
  283. <Key>
  284. <PropertyRef Name="PickupPointId" />
  285. </Key>
  286. <Property Name="PickupPointId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  287. <Property Name="PickupPointAdress" Type="String" MaxLength="Max" FixedLength="false" Unicode="false" Nullable="false" />
  288. <NavigationProperty Name="Order" Relationship="Self.FK_Order_PickupPoint" FromRole="PickupPoint" ToRole="Order" />
  289. </EntityType>
  290. <EntityType Name="Product">
  291. <Key>
  292. <PropertyRef Name="ProductArticleNumber" />
  293. </Key>
  294. <Property Name="ProductArticleNumber" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  295. <Property Name="ProductName" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  296. <Property Name="ProductDescription" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  297. <Property Name="CategoryId" Type="Int32" Nullable="false" />
  298. <Property Name="ProductPhoto" Type="Binary" MaxLength="Max" FixedLength="false" />
  299. <Property Name="ManufacturerId" Type="Int32" Nullable="false" />
  300. <Property Name="ProductCost" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  301. <Property Name="ProductDiscountAmount" Type="Double" />
  302. <Property Name="ProductQuantityInStock" Type="Int32" Nullable="false" />
  303. <Property Name="ProductStatus" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  304. <Property Name="ProdectDiscountMax" Type="Byte" Nullable="false" />
  305. <Property Name="SuplierId" Type="Int32" Nullable="false" />
  306. <Property Name="UnitId" Type="Int32" />
  307. <NavigationProperty Name="OrderProduct" Relationship="Self.FK__OrderProd__Produ__412EB0B6" FromRole="Product" ToRole="OrderProduct" />
  308. <NavigationProperty Name="ProductCategory" Relationship="Self.FK_Product_ProductCategory" FromRole="Product" ToRole="ProductCategory" />
  309. <NavigationProperty Name="ProductManufacturer" Relationship="Self.FK_Product_ProductManufacturer" FromRole="Product" ToRole="ProductManufacturer" />
  310. <NavigationProperty Name="ProductSuplier" Relationship="Self.FK_Product_ProductSuplier" FromRole="Product" ToRole="ProductSuplier" />
  311. <NavigationProperty Name="ProductUnit" Relationship="Self.FK_Product_ProductUnit" FromRole="Product" ToRole="ProductUnit" />
  312. </EntityType>
  313. <EntityType Name="ProductCategory">
  314. <Key>
  315. <PropertyRef Name="CategoryId" />
  316. </Key>
  317. <Property Name="CategoryId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  318. <Property Name="CategoryName" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
  319. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductCategory" FromRole="ProductCategory" ToRole="Product" />
  320. </EntityType>
  321. <EntityType Name="ProductManufacturer">
  322. <Key>
  323. <PropertyRef Name="ManufacturerID" />
  324. </Key>
  325. <Property Name="ManufacturerID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  326. <Property Name="ManufacturerName" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
  327. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductManufacturer" FromRole="ProductManufacturer" ToRole="Product" />
  328. </EntityType>
  329. <EntityType Name="ProductSuplier">
  330. <Key>
  331. <PropertyRef Name="SuplierId" />
  332. </Key>
  333. <Property Name="SuplierId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  334. <Property Name="SuplierName" Type="String" MaxLength="100" FixedLength="false" Unicode="false" Nullable="false" />
  335. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductSuplier" FromRole="ProductSuplier" ToRole="Product" />
  336. </EntityType>
  337. <EntityType Name="ProductUnit">
  338. <Key>
  339. <PropertyRef Name="UnitID" />
  340. </Key>
  341. <Property Name="UnitID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  342. <Property Name="UnitName" Type="String" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
  343. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductUnit" FromRole="ProductUnit" ToRole="Product" />
  344. </EntityType>
  345. <EntityType Name="Role">
  346. <Key>
  347. <PropertyRef Name="RoleID" />
  348. </Key>
  349. <Property Name="RoleID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  350. <Property Name="RoleName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  351. <NavigationProperty Name="User" Relationship="Self.FK__User__UserRole__398D8EEE" FromRole="Role" ToRole="User" />
  352. </EntityType>
  353. <EntityType Name="sysdiagrams">
  354. <Key>
  355. <PropertyRef Name="diagram_id" />
  356. </Key>
  357. <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
  358. <Property Name="principal_id" Type="Int32" Nullable="false" />
  359. <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  360. <Property Name="version" Type="Int32" />
  361. <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
  362. </EntityType>
  363. <EntityType Name="User">
  364. <Key>
  365. <PropertyRef Name="UserID" />
  366. </Key>
  367. <Property Name="UserID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  368. <Property Name="UserSurname" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  369. <Property Name="UserName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  370. <Property Name="UserPatronymic" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  371. <Property Name="UserLogin" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  372. <Property Name="UserPassword" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  373. <Property Name="UserRole" Type="Int32" Nullable="false" />
  374. <NavigationProperty Name="Role" Relationship="Self.FK__User__UserRole__398D8EEE" FromRole="User" ToRole="Role" />
  375. </EntityType>
  376. <Association Name="FK__OrderProd__Order__403A8C7D">
  377. <End Role="Order" Type="Self.Order" Multiplicity="1" />
  378. <End Role="OrderProduct" Type="Self.OrderProduct" Multiplicity="*" />
  379. <ReferentialConstraint>
  380. <Principal Role="Order">
  381. <PropertyRef Name="OrderID" />
  382. </Principal>
  383. <Dependent Role="OrderProduct">
  384. <PropertyRef Name="OrderID" />
  385. </Dependent>
  386. </ReferentialConstraint>
  387. </Association>
  388. <Association Name="FK_Order_PickupPoint">
  389. <End Role="PickupPoint" Type="Self.PickupPoint" Multiplicity="1" />
  390. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  391. <ReferentialConstraint>
  392. <Principal Role="PickupPoint">
  393. <PropertyRef Name="PickupPointId" />
  394. </Principal>
  395. <Dependent Role="Order">
  396. <PropertyRef Name="OrderPickupPoint" />
  397. </Dependent>
  398. </ReferentialConstraint>
  399. </Association>
  400. <Association Name="FK__OrderProd__Produ__412EB0B6">
  401. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  402. <End Role="OrderProduct" Type="Self.OrderProduct" Multiplicity="*" />
  403. <ReferentialConstraint>
  404. <Principal Role="Product">
  405. <PropertyRef Name="ProductArticleNumber" />
  406. </Principal>
  407. <Dependent Role="OrderProduct">
  408. <PropertyRef Name="ProductArticleNumber" />
  409. </Dependent>
  410. </ReferentialConstraint>
  411. </Association>
  412. <Association Name="FK_Product_ProductCategory">
  413. <End Role="ProductCategory" Type="Self.ProductCategory" Multiplicity="1" />
  414. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  415. <ReferentialConstraint>
  416. <Principal Role="ProductCategory">
  417. <PropertyRef Name="CategoryId" />
  418. </Principal>
  419. <Dependent Role="Product">
  420. <PropertyRef Name="CategoryId" />
  421. </Dependent>
  422. </ReferentialConstraint>
  423. </Association>
  424. <Association Name="FK_Product_ProductManufacturer">
  425. <End Role="ProductManufacturer" Type="Self.ProductManufacturer" Multiplicity="1" />
  426. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  427. <ReferentialConstraint>
  428. <Principal Role="ProductManufacturer">
  429. <PropertyRef Name="ManufacturerID" />
  430. </Principal>
  431. <Dependent Role="Product">
  432. <PropertyRef Name="CategoryId" />
  433. </Dependent>
  434. </ReferentialConstraint>
  435. </Association>
  436. <Association Name="FK_Product_ProductSuplier">
  437. <End Role="ProductSuplier" Type="Self.ProductSuplier" Multiplicity="1" />
  438. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  439. <ReferentialConstraint>
  440. <Principal Role="ProductSuplier">
  441. <PropertyRef Name="SuplierId" />
  442. </Principal>
  443. <Dependent Role="Product">
  444. <PropertyRef Name="SuplierId" />
  445. </Dependent>
  446. </ReferentialConstraint>
  447. </Association>
  448. <Association Name="FK_Product_ProductUnit">
  449. <End Role="ProductUnit" Type="Self.ProductUnit" Multiplicity="0..1" />
  450. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  451. <ReferentialConstraint>
  452. <Principal Role="ProductUnit">
  453. <PropertyRef Name="UnitID" />
  454. </Principal>
  455. <Dependent Role="Product">
  456. <PropertyRef Name="UnitId" />
  457. </Dependent>
  458. </ReferentialConstraint>
  459. </Association>
  460. <Association Name="FK__User__UserRole__398D8EEE">
  461. <End Role="Role" Type="Self.Role" Multiplicity="1" />
  462. <End Role="User" Type="Self.User" Multiplicity="*" />
  463. <ReferentialConstraint>
  464. <Principal Role="Role">
  465. <PropertyRef Name="RoleID" />
  466. </Principal>
  467. <Dependent Role="User">
  468. <PropertyRef Name="UserRole" />
  469. </Dependent>
  470. </ReferentialConstraint>
  471. </Association>
  472. <EntityContainer Name="KotBase" annotation:LazyLoadingEnabled="true">
  473. <EntitySet Name="Order" EntityType="Self.Order" />
  474. <EntitySet Name="OrderProduct" EntityType="Self.OrderProduct" />
  475. <EntitySet Name="PickupPoint" EntityType="Self.PickupPoint" />
  476. <EntitySet Name="Product" EntityType="Self.Product" />
  477. <EntitySet Name="ProductCategory" EntityType="Self.ProductCategory" />
  478. <EntitySet Name="ProductManufacturer" EntityType="Self.ProductManufacturer" />
  479. <EntitySet Name="ProductSuplier" EntityType="Self.ProductSuplier" />
  480. <EntitySet Name="ProductUnit" EntityType="Self.ProductUnit" />
  481. <EntitySet Name="Role" EntityType="Self.Role" />
  482. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
  483. <EntitySet Name="User" EntityType="Self.User" />
  484. <AssociationSet Name="FK__OrderProd__Order__403A8C7D" Association="Self.FK__OrderProd__Order__403A8C7D">
  485. <End Role="Order" EntitySet="Order" />
  486. <End Role="OrderProduct" EntitySet="OrderProduct" />
  487. </AssociationSet>
  488. <AssociationSet Name="FK_Order_PickupPoint" Association="Self.FK_Order_PickupPoint">
  489. <End Role="PickupPoint" EntitySet="PickupPoint" />
  490. <End Role="Order" EntitySet="Order" />
  491. </AssociationSet>
  492. <AssociationSet Name="FK__OrderProd__Produ__412EB0B6" Association="Self.FK__OrderProd__Produ__412EB0B6">
  493. <End Role="Product" EntitySet="Product" />
  494. <End Role="OrderProduct" EntitySet="OrderProduct" />
  495. </AssociationSet>
  496. <AssociationSet Name="FK_Product_ProductCategory" Association="Self.FK_Product_ProductCategory">
  497. <End Role="ProductCategory" EntitySet="ProductCategory" />
  498. <End Role="Product" EntitySet="Product" />
  499. </AssociationSet>
  500. <AssociationSet Name="FK_Product_ProductManufacturer" Association="Self.FK_Product_ProductManufacturer">
  501. <End Role="ProductManufacturer" EntitySet="ProductManufacturer" />
  502. <End Role="Product" EntitySet="Product" />
  503. </AssociationSet>
  504. <AssociationSet Name="FK_Product_ProductSuplier" Association="Self.FK_Product_ProductSuplier">
  505. <End Role="ProductSuplier" EntitySet="ProductSuplier" />
  506. <End Role="Product" EntitySet="Product" />
  507. </AssociationSet>
  508. <AssociationSet Name="FK_Product_ProductUnit" Association="Self.FK_Product_ProductUnit">
  509. <End Role="ProductUnit" EntitySet="ProductUnit" />
  510. <End Role="Product" EntitySet="Product" />
  511. </AssociationSet>
  512. <AssociationSet Name="FK__User__UserRole__398D8EEE" Association="Self.FK__User__UserRole__398D8EEE">
  513. <End Role="Role" EntitySet="Role" />
  514. <End Role="User" EntitySet="User" />
  515. </AssociationSet>
  516. </EntityContainer>
  517. </Schema>
  518. </edmx:ConceptualModels>
  519. <!-- C-S mapping content -->
  520. <edmx:Mappings>
  521. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  522. <EntityContainerMapping StorageEntityContainer="Хранилище KotkovaModelContainer" CdmEntityContainer="KotBase">
  523. <EntitySetMapping Name="Order">
  524. <EntityTypeMapping TypeName="KotkovaModel.Order">
  525. <MappingFragment StoreEntitySet="Order">
  526. <ScalarProperty Name="OrderID" ColumnName="OrderID" />
  527. <ScalarProperty Name="OrderStatus" ColumnName="OrderStatus" />
  528. <ScalarProperty Name="OrderDeliveryDate" ColumnName="OrderDeliveryDate" />
  529. <ScalarProperty Name="OrderPickupPoint" ColumnName="OrderPickupPoint" />
  530. <ScalarProperty Name="OrderDate" ColumnName="OrderDate" />
  531. <ScalarProperty Name="OrderCode" ColumnName="OrderCode" />
  532. <ScalarProperty Name="OrderClienr" ColumnName="OrderClienr" />
  533. </MappingFragment>
  534. </EntityTypeMapping>
  535. </EntitySetMapping>
  536. <EntitySetMapping Name="OrderProduct">
  537. <EntityTypeMapping TypeName="KotkovaModel.OrderProduct">
  538. <MappingFragment StoreEntitySet="OrderProduct">
  539. <ScalarProperty Name="OrderProductId" ColumnName="OrderProductId" />
  540. <ScalarProperty Name="OrderID" ColumnName="OrderID" />
  541. <ScalarProperty Name="ProductArticleNumber" ColumnName="ProductArticleNumber" />
  542. <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
  543. </MappingFragment>
  544. </EntityTypeMapping>
  545. </EntitySetMapping>
  546. <EntitySetMapping Name="PickupPoint">
  547. <EntityTypeMapping TypeName="KotkovaModel.PickupPoint">
  548. <MappingFragment StoreEntitySet="PickupPoint">
  549. <ScalarProperty Name="PickupPointId" ColumnName="PickupPointId" />
  550. <ScalarProperty Name="PickupPointAdress" ColumnName="PickupPointAdress" />
  551. </MappingFragment>
  552. </EntityTypeMapping>
  553. </EntitySetMapping>
  554. <EntitySetMapping Name="Product">
  555. <EntityTypeMapping TypeName="KotkovaModel.Product">
  556. <MappingFragment StoreEntitySet="Product">
  557. <ScalarProperty Name="ProductArticleNumber" ColumnName="ProductArticleNumber" />
  558. <ScalarProperty Name="ProductName" ColumnName="ProductName" />
  559. <ScalarProperty Name="ProductDescription" ColumnName="ProductDescription" />
  560. <ScalarProperty Name="CategoryId" ColumnName="CategoryId" />
  561. <ScalarProperty Name="ProductPhoto" ColumnName="ProductPhoto" />
  562. <ScalarProperty Name="ManufacturerId" ColumnName="ManufacturerId" />
  563. <ScalarProperty Name="ProductCost" ColumnName="ProductCost" />
  564. <ScalarProperty Name="ProductDiscountAmount" ColumnName="ProductDiscountAmount" />
  565. <ScalarProperty Name="ProductQuantityInStock" ColumnName="ProductQuantityInStock" />
  566. <ScalarProperty Name="ProductStatus" ColumnName="ProductStatus" />
  567. <ScalarProperty Name="ProdectDiscountMax" ColumnName="ProdectDiscountMax" />
  568. <ScalarProperty Name="SuplierId" ColumnName="SuplierId" />
  569. <ScalarProperty Name="UnitId" ColumnName="UnitId" />
  570. </MappingFragment>
  571. </EntityTypeMapping>
  572. </EntitySetMapping>
  573. <EntitySetMapping Name="ProductCategory">
  574. <EntityTypeMapping TypeName="KotkovaModel.ProductCategory">
  575. <MappingFragment StoreEntitySet="ProductCategory">
  576. <ScalarProperty Name="CategoryId" ColumnName="CategoryId" />
  577. <ScalarProperty Name="CategoryName" ColumnName="CategoryName" />
  578. </MappingFragment>
  579. </EntityTypeMapping>
  580. </EntitySetMapping>
  581. <EntitySetMapping Name="ProductManufacturer">
  582. <EntityTypeMapping TypeName="KotkovaModel.ProductManufacturer">
  583. <MappingFragment StoreEntitySet="ProductManufacturer">
  584. <ScalarProperty Name="ManufacturerID" ColumnName="ManufacturerID" />
  585. <ScalarProperty Name="ManufacturerName" ColumnName="ManufacturerName" />
  586. </MappingFragment>
  587. </EntityTypeMapping>
  588. </EntitySetMapping>
  589. <EntitySetMapping Name="ProductSuplier">
  590. <EntityTypeMapping TypeName="KotkovaModel.ProductSuplier">
  591. <MappingFragment StoreEntitySet="ProductSuplier">
  592. <ScalarProperty Name="SuplierId" ColumnName="SuplierId" />
  593. <ScalarProperty Name="SuplierName" ColumnName="SuplierName" />
  594. </MappingFragment>
  595. </EntityTypeMapping>
  596. </EntitySetMapping>
  597. <EntitySetMapping Name="ProductUnit">
  598. <EntityTypeMapping TypeName="KotkovaModel.ProductUnit">
  599. <MappingFragment StoreEntitySet="ProductUnit">
  600. <ScalarProperty Name="UnitID" ColumnName="UnitID" />
  601. <ScalarProperty Name="UnitName" ColumnName="UnitName" />
  602. </MappingFragment>
  603. </EntityTypeMapping>
  604. </EntitySetMapping>
  605. <EntitySetMapping Name="Role">
  606. <EntityTypeMapping TypeName="KotkovaModel.Role">
  607. <MappingFragment StoreEntitySet="Role">
  608. <ScalarProperty Name="RoleID" ColumnName="RoleID" />
  609. <ScalarProperty Name="RoleName" ColumnName="RoleName" />
  610. </MappingFragment>
  611. </EntityTypeMapping>
  612. </EntitySetMapping>
  613. <EntitySetMapping Name="sysdiagrams">
  614. <EntityTypeMapping TypeName="KotkovaModel.sysdiagrams">
  615. <MappingFragment StoreEntitySet="sysdiagrams">
  616. <ScalarProperty Name="name" ColumnName="name" />
  617. <ScalarProperty Name="principal_id" ColumnName="principal_id" />
  618. <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
  619. <ScalarProperty Name="version" ColumnName="version" />
  620. <ScalarProperty Name="definition" ColumnName="definition" />
  621. </MappingFragment>
  622. </EntityTypeMapping>
  623. </EntitySetMapping>
  624. <EntitySetMapping Name="User">
  625. <EntityTypeMapping TypeName="KotkovaModel.User">
  626. <MappingFragment StoreEntitySet="User">
  627. <ScalarProperty Name="UserID" ColumnName="UserID" />
  628. <ScalarProperty Name="UserSurname" ColumnName="UserSurname" />
  629. <ScalarProperty Name="UserName" ColumnName="UserName" />
  630. <ScalarProperty Name="UserPatronymic" ColumnName="UserPatronymic" />
  631. <ScalarProperty Name="UserLogin" ColumnName="UserLogin" />
  632. <ScalarProperty Name="UserPassword" ColumnName="UserPassword" />
  633. <ScalarProperty Name="UserRole" ColumnName="UserRole" />
  634. </MappingFragment>
  635. </EntityTypeMapping>
  636. </EntitySetMapping>
  637. </EntityContainerMapping>
  638. </Mapping>
  639. </edmx:Mappings>
  640. </edmx:Runtime>
  641. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  642. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  643. <Connection>
  644. <DesignerInfoPropertySet>
  645. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  646. </DesignerInfoPropertySet>
  647. </Connection>
  648. <Options>
  649. <DesignerInfoPropertySet>
  650. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  651. <DesignerProperty Name="EnablePluralization" Value="false" />
  652. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  653. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  654. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  655. </DesignerInfoPropertySet>
  656. </Options>
  657. <!-- Diagram content (shape and connector positions) -->
  658. <Diagrams></Diagrams>
  659. </Designer>
  660. </edmx:Edmx>