Model1.edmx 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926
  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="Хранилище Model" 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="Agent">
  9. <Key>
  10. <PropertyRef Name="ID" />
  11. </Key>
  12. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  13. <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
  14. <Property Name="AgentTypeID" Type="int" Nullable="false" />
  15. <Property Name="Address" Type="nvarchar" MaxLength="300" />
  16. <Property Name="INN" Type="varchar" MaxLength="12" Nullable="false" />
  17. <Property Name="KPP" Type="varchar" MaxLength="9" />
  18. <Property Name="DirectorName" Type="nvarchar" MaxLength="100" />
  19. <Property Name="Phone" Type="nvarchar" MaxLength="20" Nullable="false" />
  20. <Property Name="Email" Type="nvarchar" MaxLength="255" />
  21. <Property Name="Logo" Type="nvarchar" MaxLength="100" />
  22. <Property Name="Priority" Type="int" Nullable="false" />
  23. </EntityType>
  24. <EntityType Name="AgentPriorityHistory">
  25. <Key>
  26. <PropertyRef Name="ID" />
  27. </Key>
  28. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  29. <Property Name="AgentID" Type="int" Nullable="false" />
  30. <Property Name="ChangeDate" Type="datetime" Nullable="false" />
  31. <Property Name="PriorityValue" Type="int" Nullable="false" />
  32. </EntityType>
  33. <EntityType Name="AgentType">
  34. <Key>
  35. <PropertyRef Name="ID" />
  36. </Key>
  37. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  38. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  39. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  40. </EntityType>
  41. <EntityType Name="Material">
  42. <Key>
  43. <PropertyRef Name="ID" />
  44. </Key>
  45. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  46. <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
  47. <Property Name="CountInPack" Type="int" Nullable="false" />
  48. <Property Name="Unit" Type="nvarchar" MaxLength="10" Nullable="false" />
  49. <Property Name="CountInStock" Type="float" />
  50. <Property Name="MinCount" Type="float" Nullable="false" />
  51. <Property Name="Description" Type="nvarchar(max)" />
  52. <Property Name="Cost" Type="decimal" Precision="10" Scale="2" Nullable="false" />
  53. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  54. <Property Name="MaterialTypeID" Type="int" Nullable="false" />
  55. </EntityType>
  56. <EntityType Name="MaterialCountHistory">
  57. <Key>
  58. <PropertyRef Name="ID" />
  59. </Key>
  60. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  61. <Property Name="MaterialID" Type="int" Nullable="false" />
  62. <Property Name="ChangeDate" Type="datetime" Nullable="false" />
  63. <Property Name="CountValue" Type="float" Nullable="false" />
  64. </EntityType>
  65. <EntityType Name="MaterialSupplier">
  66. <Key>
  67. <PropertyRef Name="MaterialID" />
  68. <PropertyRef Name="SupplierID" />
  69. </Key>
  70. <Property Name="MaterialID" Type="int" Nullable="false" />
  71. <Property Name="SupplierID" Type="int" Nullable="false" />
  72. </EntityType>
  73. <EntityType Name="MaterialType">
  74. <Key>
  75. <PropertyRef Name="ID" />
  76. </Key>
  77. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  78. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  79. <Property Name="DefectedPercent" Type="float" />
  80. </EntityType>
  81. <EntityType Name="Product">
  82. <Key>
  83. <PropertyRef Name="ID" />
  84. </Key>
  85. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  86. <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
  87. <Property Name="ProductTypeID" Type="int" />
  88. <Property Name="ArticleNumber" Type="nvarchar" MaxLength="10" Nullable="false" />
  89. <Property Name="Description" Type="nvarchar(max)" />
  90. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  91. <Property Name="ProductionPersonCount" Type="int" />
  92. <Property Name="ProductionWorkshopNumber" Type="int" Nullable="false" />
  93. <Property Name="MinCostForAgent" Type="decimal" Precision="10" Scale="2" Nullable="false" />
  94. </EntityType>
  95. <EntityType Name="ProductCostHistory">
  96. <Key>
  97. <PropertyRef Name="ID" />
  98. </Key>
  99. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  100. <Property Name="ProductID" Type="int" Nullable="false" />
  101. <Property Name="ChangeDate" Type="datetime" Nullable="false" />
  102. <Property Name="CostValue" Type="decimal" Precision="10" Scale="2" Nullable="false" />
  103. </EntityType>
  104. <EntityType Name="ProductMaterial">
  105. <Key>
  106. <PropertyRef Name="ID" />
  107. </Key>
  108. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  109. <Property Name="ProductID" Type="int" Nullable="false" />
  110. <Property Name="MaterialID" Type="int" Nullable="false" />
  111. <Property Name="Count" Type="float" />
  112. </EntityType>
  113. <EntityType Name="ProductSale">
  114. <Key>
  115. <PropertyRef Name="ID" />
  116. </Key>
  117. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  118. <Property Name="AgentID" Type="int" Nullable="false" />
  119. <Property Name="ProductID" Type="int" Nullable="false" />
  120. <Property Name="SaleDate" Type="date" Nullable="false" />
  121. <Property Name="ProductCount" Type="int" Nullable="false" />
  122. </EntityType>
  123. <EntityType Name="ProductType">
  124. <Key>
  125. <PropertyRef Name="ID" />
  126. </Key>
  127. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  128. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  129. <Property Name="DefectedPercent" Type="float" />
  130. </EntityType>
  131. <EntityType Name="Shop">
  132. <Key>
  133. <PropertyRef Name="ID" />
  134. </Key>
  135. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  136. <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
  137. <Property Name="Address" Type="nvarchar" MaxLength="300" />
  138. <Property Name="AgentID" Type="int" Nullable="false" />
  139. </EntityType>
  140. <EntityType Name="Supplier">
  141. <Key>
  142. <PropertyRef Name="ID" />
  143. </Key>
  144. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  145. <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
  146. <Property Name="INN" Type="varchar" MaxLength="12" Nullable="false" />
  147. <Property Name="StartDate" Type="date" Nullable="false" />
  148. <Property Name="QualityRating" Type="int" />
  149. <Property Name="SupplierType" Type="nvarchar" MaxLength="20" />
  150. </EntityType>
  151. <Association Name="FK_Agent_AgentType">
  152. <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
  153. <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
  154. <ReferentialConstraint>
  155. <Principal Role="AgentType">
  156. <PropertyRef Name="ID" />
  157. </Principal>
  158. <Dependent Role="Agent">
  159. <PropertyRef Name="AgentTypeID" />
  160. </Dependent>
  161. </ReferentialConstraint>
  162. </Association>
  163. <Association Name="FK_AgentPriorityHistory_Agent">
  164. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  165. <End Role="AgentPriorityHistory" Type="Self.AgentPriorityHistory" Multiplicity="*" />
  166. <ReferentialConstraint>
  167. <Principal Role="Agent">
  168. <PropertyRef Name="ID" />
  169. </Principal>
  170. <Dependent Role="AgentPriorityHistory">
  171. <PropertyRef Name="AgentID" />
  172. </Dependent>
  173. </ReferentialConstraint>
  174. </Association>
  175. <Association Name="FK_Material_MaterialType">
  176. <End Role="MaterialType" Type="Self.MaterialType" Multiplicity="1" />
  177. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  178. <ReferentialConstraint>
  179. <Principal Role="MaterialType">
  180. <PropertyRef Name="ID" />
  181. </Principal>
  182. <Dependent Role="Material">
  183. <PropertyRef Name="MaterialTypeID" />
  184. </Dependent>
  185. </ReferentialConstraint>
  186. </Association>
  187. <Association Name="FK_MaterialCountHistory_Material">
  188. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  189. <End Role="MaterialCountHistory" Type="Self.MaterialCountHistory" Multiplicity="*" />
  190. <ReferentialConstraint>
  191. <Principal Role="Material">
  192. <PropertyRef Name="ID" />
  193. </Principal>
  194. <Dependent Role="MaterialCountHistory">
  195. <PropertyRef Name="MaterialID" />
  196. </Dependent>
  197. </ReferentialConstraint>
  198. </Association>
  199. <Association Name="FK_MaterialSupplier_Material">
  200. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  201. <End Role="MaterialSupplier" Type="Self.MaterialSupplier" Multiplicity="*" />
  202. <ReferentialConstraint>
  203. <Principal Role="Material">
  204. <PropertyRef Name="ID" />
  205. </Principal>
  206. <Dependent Role="MaterialSupplier">
  207. <PropertyRef Name="MaterialID" />
  208. </Dependent>
  209. </ReferentialConstraint>
  210. </Association>
  211. <Association Name="FK_MaterialSupplier_Supplier">
  212. <End Role="Supplier" Type="Self.Supplier" Multiplicity="1" />
  213. <End Role="MaterialSupplier" Type="Self.MaterialSupplier" Multiplicity="*" />
  214. <ReferentialConstraint>
  215. <Principal Role="Supplier">
  216. <PropertyRef Name="ID" />
  217. </Principal>
  218. <Dependent Role="MaterialSupplier">
  219. <PropertyRef Name="SupplierID" />
  220. </Dependent>
  221. </ReferentialConstraint>
  222. </Association>
  223. <Association Name="FK_Product_ProductType">
  224. <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
  225. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  226. <ReferentialConstraint>
  227. <Principal Role="ProductType">
  228. <PropertyRef Name="ID" />
  229. </Principal>
  230. <Dependent Role="Product">
  231. <PropertyRef Name="ProductTypeID" />
  232. </Dependent>
  233. </ReferentialConstraint>
  234. </Association>
  235. <Association Name="FK_ProductCostHistory_Product">
  236. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  237. <End Role="ProductCostHistory" Type="Self.ProductCostHistory" Multiplicity="*" />
  238. <ReferentialConstraint>
  239. <Principal Role="Product">
  240. <PropertyRef Name="ID" />
  241. </Principal>
  242. <Dependent Role="ProductCostHistory">
  243. <PropertyRef Name="ProductID" />
  244. </Dependent>
  245. </ReferentialConstraint>
  246. </Association>
  247. <Association Name="FK_ProductMaterial_Material">
  248. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  249. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  250. <ReferentialConstraint>
  251. <Principal Role="Material">
  252. <PropertyRef Name="ID" />
  253. </Principal>
  254. <Dependent Role="ProductMaterial">
  255. <PropertyRef Name="MaterialID" />
  256. </Dependent>
  257. </ReferentialConstraint>
  258. </Association>
  259. <Association Name="FK_ProductMaterial_Product">
  260. <End Role="Product" Type="Self.Product" Multiplicity="1">
  261. <OnDelete Action="Cascade" />
  262. </End>
  263. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  264. <ReferentialConstraint>
  265. <Principal Role="Product">
  266. <PropertyRef Name="ID" />
  267. </Principal>
  268. <Dependent Role="ProductMaterial">
  269. <PropertyRef Name="ProductID" />
  270. </Dependent>
  271. </ReferentialConstraint>
  272. </Association>
  273. <Association Name="FK_ProductSale_Agent">
  274. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  275. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  276. <ReferentialConstraint>
  277. <Principal Role="Agent">
  278. <PropertyRef Name="ID" />
  279. </Principal>
  280. <Dependent Role="ProductSale">
  281. <PropertyRef Name="AgentID" />
  282. </Dependent>
  283. </ReferentialConstraint>
  284. </Association>
  285. <Association Name="FK_ProductSale_Product">
  286. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  287. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  288. <ReferentialConstraint>
  289. <Principal Role="Product">
  290. <PropertyRef Name="ID" />
  291. </Principal>
  292. <Dependent Role="ProductSale">
  293. <PropertyRef Name="ProductID" />
  294. </Dependent>
  295. </ReferentialConstraint>
  296. </Association>
  297. <Association Name="FK_Shop_Agent">
  298. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  299. <End Role="Shop" Type="Self.Shop" Multiplicity="*" />
  300. <ReferentialConstraint>
  301. <Principal Role="Agent">
  302. <PropertyRef Name="ID" />
  303. </Principal>
  304. <Dependent Role="Shop">
  305. <PropertyRef Name="AgentID" />
  306. </Dependent>
  307. </ReferentialConstraint>
  308. </Association>
  309. <EntityContainer Name="Хранилище ModelContainer">
  310. <EntitySet Name="Agent" EntityType="Self.Agent" Schema="dbo" store:Type="Tables" />
  311. <EntitySet Name="AgentPriorityHistory" EntityType="Self.AgentPriorityHistory" Schema="dbo" store:Type="Tables" />
  312. <EntitySet Name="AgentType" EntityType="Self.AgentType" Schema="dbo" store:Type="Tables" />
  313. <EntitySet Name="Material" EntityType="Self.Material" Schema="dbo" store:Type="Tables" />
  314. <EntitySet Name="MaterialCountHistory" EntityType="Self.MaterialCountHistory" Schema="dbo" store:Type="Tables" />
  315. <EntitySet Name="MaterialSupplier" EntityType="Self.MaterialSupplier" Schema="dbo" store:Type="Tables" />
  316. <EntitySet Name="MaterialType" EntityType="Self.MaterialType" Schema="dbo" store:Type="Tables" />
  317. <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
  318. <EntitySet Name="ProductCostHistory" EntityType="Self.ProductCostHistory" Schema="dbo" store:Type="Tables" />
  319. <EntitySet Name="ProductMaterial" EntityType="Self.ProductMaterial" Schema="dbo" store:Type="Tables" />
  320. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" Schema="dbo" store:Type="Tables" />
  321. <EntitySet Name="ProductType" EntityType="Self.ProductType" Schema="dbo" store:Type="Tables" />
  322. <EntitySet Name="Shop" EntityType="Self.Shop" Schema="dbo" store:Type="Tables" />
  323. <EntitySet Name="Supplier" EntityType="Self.Supplier" Schema="dbo" store:Type="Tables" />
  324. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  325. <End Role="AgentType" EntitySet="AgentType" />
  326. <End Role="Agent" EntitySet="Agent" />
  327. </AssociationSet>
  328. <AssociationSet Name="FK_AgentPriorityHistory_Agent" Association="Self.FK_AgentPriorityHistory_Agent">
  329. <End Role="Agent" EntitySet="Agent" />
  330. <End Role="AgentPriorityHistory" EntitySet="AgentPriorityHistory" />
  331. </AssociationSet>
  332. <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
  333. <End Role="MaterialType" EntitySet="MaterialType" />
  334. <End Role="Material" EntitySet="Material" />
  335. </AssociationSet>
  336. <AssociationSet Name="FK_MaterialCountHistory_Material" Association="Self.FK_MaterialCountHistory_Material">
  337. <End Role="Material" EntitySet="Material" />
  338. <End Role="MaterialCountHistory" EntitySet="MaterialCountHistory" />
  339. </AssociationSet>
  340. <AssociationSet Name="FK_MaterialSupplier_Material" Association="Self.FK_MaterialSupplier_Material">
  341. <End Role="Material" EntitySet="Material" />
  342. <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
  343. </AssociationSet>
  344. <AssociationSet Name="FK_MaterialSupplier_Supplier" Association="Self.FK_MaterialSupplier_Supplier">
  345. <End Role="Supplier" EntitySet="Supplier" />
  346. <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
  347. </AssociationSet>
  348. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  349. <End Role="ProductType" EntitySet="ProductType" />
  350. <End Role="Product" EntitySet="Product" />
  351. </AssociationSet>
  352. <AssociationSet Name="FK_ProductCostHistory_Product" Association="Self.FK_ProductCostHistory_Product">
  353. <End Role="Product" EntitySet="Product" />
  354. <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
  355. </AssociationSet>
  356. <AssociationSet Name="FK_ProductMaterial_Material" Association="Self.FK_ProductMaterial_Material">
  357. <End Role="Material" EntitySet="Material" />
  358. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  359. </AssociationSet>
  360. <AssociationSet Name="FK_ProductMaterial_Product" Association="Self.FK_ProductMaterial_Product">
  361. <End Role="Product" EntitySet="Product" />
  362. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  363. </AssociationSet>
  364. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  365. <End Role="Agent" EntitySet="Agent" />
  366. <End Role="ProductSale" EntitySet="ProductSale" />
  367. </AssociationSet>
  368. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  369. <End Role="Product" EntitySet="Product" />
  370. <End Role="ProductSale" EntitySet="ProductSale" />
  371. </AssociationSet>
  372. <AssociationSet Name="FK_Shop_Agent" Association="Self.FK_Shop_Agent">
  373. <End Role="Agent" EntitySet="Agent" />
  374. <End Role="Shop" EntitySet="Shop" />
  375. </AssociationSet>
  376. </EntityContainer>
  377. </Schema></edmx:StorageModels>
  378. <!-- CSDL content -->
  379. <edmx:ConceptualModels>
  380. <Schema Namespace="Model" 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">
  381. <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
  382. <EntitySet Name="Agent" EntityType="Model.Agent" />
  383. <EntitySet Name="AgentPriorityHistory" EntityType="Model.AgentPriorityHistory" />
  384. <EntitySet Name="AgentType" EntityType="Model.AgentType" />
  385. <EntitySet Name="Material" EntityType="Model.Material" />
  386. <EntitySet Name="MaterialCountHistory" EntityType="Model.MaterialCountHistory" />
  387. <EntitySet Name="MaterialType" EntityType="Model.MaterialType" />
  388. <EntitySet Name="Product" EntityType="Model.Product" />
  389. <EntitySet Name="ProductCostHistory" EntityType="Model.ProductCostHistory" />
  390. <EntitySet Name="ProductMaterial" EntityType="Model.ProductMaterial" />
  391. <EntitySet Name="ProductSale" EntityType="Model.ProductSale" />
  392. <EntitySet Name="ProductType" EntityType="Model.ProductType" />
  393. <EntitySet Name="Shop" EntityType="Model.Shop" />
  394. <EntitySet Name="Supplier" EntityType="Model.Supplier" />
  395. <AssociationSet Name="FK_Agent_AgentType" Association="Model.FK_Agent_AgentType">
  396. <End Role="AgentType" EntitySet="AgentType" />
  397. <End Role="Agent" EntitySet="Agent" />
  398. </AssociationSet>
  399. <AssociationSet Name="FK_AgentPriorityHistory_Agent" Association="Model.FK_AgentPriorityHistory_Agent">
  400. <End Role="Agent" EntitySet="Agent" />
  401. <End Role="AgentPriorityHistory" EntitySet="AgentPriorityHistory" />
  402. </AssociationSet>
  403. <AssociationSet Name="FK_ProductSale_Agent" Association="Model.FK_ProductSale_Agent">
  404. <End Role="Agent" EntitySet="Agent" />
  405. <End Role="ProductSale" EntitySet="ProductSale" />
  406. </AssociationSet>
  407. <AssociationSet Name="FK_Shop_Agent" Association="Model.FK_Shop_Agent">
  408. <End Role="Agent" EntitySet="Agent" />
  409. <End Role="Shop" EntitySet="Shop" />
  410. </AssociationSet>
  411. <AssociationSet Name="FK_Material_MaterialType" Association="Model.FK_Material_MaterialType">
  412. <End Role="MaterialType" EntitySet="MaterialType" />
  413. <End Role="Material" EntitySet="Material" />
  414. </AssociationSet>
  415. <AssociationSet Name="FK_MaterialCountHistory_Material" Association="Model.FK_MaterialCountHistory_Material">
  416. <End Role="Material" EntitySet="Material" />
  417. <End Role="MaterialCountHistory" EntitySet="MaterialCountHistory" />
  418. </AssociationSet>
  419. <AssociationSet Name="FK_ProductMaterial_Material" Association="Model.FK_ProductMaterial_Material">
  420. <End Role="Material" EntitySet="Material" />
  421. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  422. </AssociationSet>
  423. <AssociationSet Name="FK_Product_ProductType" Association="Model.FK_Product_ProductType">
  424. <End Role="ProductType" EntitySet="ProductType" />
  425. <End Role="Product" EntitySet="Product" />
  426. </AssociationSet>
  427. <AssociationSet Name="FK_ProductCostHistory_Product" Association="Model.FK_ProductCostHistory_Product">
  428. <End Role="Product" EntitySet="Product" />
  429. <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
  430. </AssociationSet>
  431. <AssociationSet Name="FK_ProductMaterial_Product" Association="Model.FK_ProductMaterial_Product">
  432. <End Role="Product" EntitySet="Product" />
  433. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  434. </AssociationSet>
  435. <AssociationSet Name="FK_ProductSale_Product" Association="Model.FK_ProductSale_Product">
  436. <End Role="Product" EntitySet="Product" />
  437. <End Role="ProductSale" EntitySet="ProductSale" />
  438. </AssociationSet>
  439. <AssociationSet Name="MaterialSupplier" Association="Model.MaterialSupplier">
  440. <End Role="Material" EntitySet="Material" />
  441. <End Role="Supplier" EntitySet="Supplier" />
  442. </AssociationSet>
  443. </EntityContainer>
  444. <EntityType Name="Agent">
  445. <Key>
  446. <PropertyRef Name="ID" />
  447. </Key>
  448. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  449. <Property Name="Title" Type="String" Nullable="false" MaxLength="150" FixedLength="false" Unicode="true" />
  450. <Property Name="AgentTypeID" Type="Int32" Nullable="false" />
  451. <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
  452. <Property Name="INN" Type="String" Nullable="false" MaxLength="12" FixedLength="false" Unicode="false" />
  453. <Property Name="KPP" Type="String" MaxLength="9" FixedLength="false" Unicode="false" />
  454. <Property Name="DirectorName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  455. <Property Name="Phone" Type="String" Nullable="false" MaxLength="20" FixedLength="false" Unicode="true" />
  456. <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
  457. <Property Name="Logo" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  458. <Property Name="Priority" Type="Int32" Nullable="false" />
  459. <NavigationProperty Name="AgentType" Relationship="Model.FK_Agent_AgentType" FromRole="Agent" ToRole="AgentType" />
  460. <NavigationProperty Name="AgentPriorityHistory" Relationship="Model.FK_AgentPriorityHistory_Agent" FromRole="Agent" ToRole="AgentPriorityHistory" />
  461. <NavigationProperty Name="ProductSale" Relationship="Model.FK_ProductSale_Agent" FromRole="Agent" ToRole="ProductSale" />
  462. <NavigationProperty Name="Shop" Relationship="Model.FK_Shop_Agent" FromRole="Agent" ToRole="Shop" />
  463. </EntityType>
  464. <EntityType Name="AgentPriorityHistory">
  465. <Key>
  466. <PropertyRef Name="ID" />
  467. </Key>
  468. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  469. <Property Name="AgentID" Type="Int32" Nullable="false" />
  470. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  471. <Property Name="PriorityValue" Type="Int32" Nullable="false" />
  472. <NavigationProperty Name="Agent" Relationship="Model.FK_AgentPriorityHistory_Agent" FromRole="AgentPriorityHistory" ToRole="Agent" />
  473. </EntityType>
  474. <EntityType Name="AgentType">
  475. <Key>
  476. <PropertyRef Name="ID" />
  477. </Key>
  478. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  479. <Property Name="Title" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  480. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  481. <NavigationProperty Name="Agent" Relationship="Model.FK_Agent_AgentType" FromRole="AgentType" ToRole="Agent" />
  482. </EntityType>
  483. <EntityType Name="Material">
  484. <Key>
  485. <PropertyRef Name="ID" />
  486. </Key>
  487. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  488. <Property Name="Title" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" />
  489. <Property Name="CountInPack" Type="Int32" Nullable="false" />
  490. <Property Name="Unit" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="true" />
  491. <Property Name="CountInStock" Type="Double" />
  492. <Property Name="MinCount" Type="Double" Nullable="false" />
  493. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  494. <Property Name="Cost" Type="Decimal" Nullable="false" Precision="10" Scale="2" />
  495. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  496. <Property Name="MaterialTypeID" Type="Int32" Nullable="false" />
  497. <NavigationProperty Name="MaterialType" Relationship="Model.FK_Material_MaterialType" FromRole="Material" ToRole="MaterialType" />
  498. <NavigationProperty Name="MaterialCountHistory" Relationship="Model.FK_MaterialCountHistory_Material" FromRole="Material" ToRole="MaterialCountHistory" />
  499. <NavigationProperty Name="ProductMaterial" Relationship="Model.FK_ProductMaterial_Material" FromRole="Material" ToRole="ProductMaterial" />
  500. <NavigationProperty Name="Supplier" Relationship="Model.MaterialSupplier" FromRole="Material" ToRole="Supplier" />
  501. </EntityType>
  502. <EntityType Name="MaterialCountHistory">
  503. <Key>
  504. <PropertyRef Name="ID" />
  505. </Key>
  506. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  507. <Property Name="MaterialID" Type="Int32" Nullable="false" />
  508. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  509. <Property Name="CountValue" Type="Double" Nullable="false" />
  510. <NavigationProperty Name="Material" Relationship="Model.FK_MaterialCountHistory_Material" FromRole="MaterialCountHistory" ToRole="Material" />
  511. </EntityType>
  512. <EntityType Name="MaterialType">
  513. <Key>
  514. <PropertyRef Name="ID" />
  515. </Key>
  516. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  517. <Property Name="Title" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  518. <Property Name="DefectedPercent" Type="Double" />
  519. <NavigationProperty Name="Material" Relationship="Model.FK_Material_MaterialType" FromRole="MaterialType" ToRole="Material" />
  520. </EntityType>
  521. <EntityType Name="Product">
  522. <Key>
  523. <PropertyRef Name="ID" />
  524. </Key>
  525. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  526. <Property Name="Title" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" />
  527. <Property Name="ProductTypeID" Type="Int32" />
  528. <Property Name="ArticleNumber" Type="String" Nullable="false" MaxLength="10" FixedLength="false" Unicode="true" />
  529. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  530. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  531. <Property Name="ProductionPersonCount" Type="Int32" />
  532. <Property Name="ProductionWorkshopNumber" Type="Int32" Nullable="false" />
  533. <Property Name="MinCostForAgent" Type="Decimal" Nullable="false" Precision="10" Scale="2" />
  534. <NavigationProperty Name="ProductType" Relationship="Model.FK_Product_ProductType" FromRole="Product" ToRole="ProductType" />
  535. <NavigationProperty Name="ProductCostHistory" Relationship="Model.FK_ProductCostHistory_Product" FromRole="Product" ToRole="ProductCostHistory" />
  536. <NavigationProperty Name="ProductMaterial" Relationship="Model.FK_ProductMaterial_Product" FromRole="Product" ToRole="ProductMaterial" />
  537. <NavigationProperty Name="ProductSale" Relationship="Model.FK_ProductSale_Product" FromRole="Product" ToRole="ProductSale" />
  538. </EntityType>
  539. <EntityType Name="ProductCostHistory">
  540. <Key>
  541. <PropertyRef Name="ID" />
  542. </Key>
  543. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  544. <Property Name="ProductID" Type="Int32" Nullable="false" />
  545. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  546. <Property Name="CostValue" Type="Decimal" Nullable="false" Precision="10" Scale="2" />
  547. <NavigationProperty Name="Product" Relationship="Model.FK_ProductCostHistory_Product" FromRole="ProductCostHistory" ToRole="Product" />
  548. </EntityType>
  549. <EntityType Name="ProductMaterial">
  550. <Key>
  551. <PropertyRef Name="ID" />
  552. </Key>
  553. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  554. <Property Name="ProductID" Type="Int32" Nullable="false" />
  555. <Property Name="MaterialID" Type="Int32" Nullable="false" />
  556. <Property Name="Count" Type="Double" />
  557. <NavigationProperty Name="Material" Relationship="Model.FK_ProductMaterial_Material" FromRole="ProductMaterial" ToRole="Material" />
  558. <NavigationProperty Name="Product" Relationship="Model.FK_ProductMaterial_Product" FromRole="ProductMaterial" ToRole="Product" />
  559. </EntityType>
  560. <EntityType Name="ProductSale">
  561. <Key>
  562. <PropertyRef Name="ID" />
  563. </Key>
  564. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  565. <Property Name="AgentID" Type="Int32" Nullable="false" />
  566. <Property Name="ProductID" Type="Int32" Nullable="false" />
  567. <Property Name="SaleDate" Type="DateTime" Nullable="false" Precision="0" />
  568. <Property Name="ProductCount" Type="Int32" Nullable="false" />
  569. <NavigationProperty Name="Agent" Relationship="Model.FK_ProductSale_Agent" FromRole="ProductSale" ToRole="Agent" />
  570. <NavigationProperty Name="Product" Relationship="Model.FK_ProductSale_Product" FromRole="ProductSale" ToRole="Product" />
  571. </EntityType>
  572. <EntityType Name="ProductType">
  573. <Key>
  574. <PropertyRef Name="ID" />
  575. </Key>
  576. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  577. <Property Name="Title" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
  578. <Property Name="DefectedPercent" Type="Double" />
  579. <NavigationProperty Name="Product" Relationship="Model.FK_Product_ProductType" FromRole="ProductType" ToRole="Product" />
  580. </EntityType>
  581. <EntityType Name="Shop">
  582. <Key>
  583. <PropertyRef Name="ID" />
  584. </Key>
  585. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  586. <Property Name="Title" Type="String" Nullable="false" MaxLength="150" FixedLength="false" Unicode="true" />
  587. <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
  588. <Property Name="AgentID" Type="Int32" Nullable="false" />
  589. <NavigationProperty Name="Agent" Relationship="Model.FK_Shop_Agent" FromRole="Shop" ToRole="Agent" />
  590. </EntityType>
  591. <EntityType Name="Supplier">
  592. <Key>
  593. <PropertyRef Name="ID" />
  594. </Key>
  595. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  596. <Property Name="Title" Type="String" Nullable="false" MaxLength="150" FixedLength="false" Unicode="true" />
  597. <Property Name="INN" Type="String" Nullable="false" MaxLength="12" FixedLength="false" Unicode="false" />
  598. <Property Name="StartDate" Type="DateTime" Nullable="false" Precision="0" />
  599. <Property Name="QualityRating" Type="Int32" />
  600. <Property Name="SupplierType" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
  601. <NavigationProperty Name="Material" Relationship="Model.MaterialSupplier" FromRole="Supplier" ToRole="Material" />
  602. </EntityType>
  603. <Association Name="FK_Agent_AgentType">
  604. <End Type="Model.AgentType" Role="AgentType" Multiplicity="1" />
  605. <End Type="Model.Agent" Role="Agent" Multiplicity="*" />
  606. <ReferentialConstraint>
  607. <Principal Role="AgentType">
  608. <PropertyRef Name="ID" />
  609. </Principal>
  610. <Dependent Role="Agent">
  611. <PropertyRef Name="AgentTypeID" />
  612. </Dependent>
  613. </ReferentialConstraint>
  614. </Association>
  615. <Association Name="FK_AgentPriorityHistory_Agent">
  616. <End Type="Model.Agent" Role="Agent" Multiplicity="1" />
  617. <End Type="Model.AgentPriorityHistory" Role="AgentPriorityHistory" Multiplicity="*" />
  618. <ReferentialConstraint>
  619. <Principal Role="Agent">
  620. <PropertyRef Name="ID" />
  621. </Principal>
  622. <Dependent Role="AgentPriorityHistory">
  623. <PropertyRef Name="AgentID" />
  624. </Dependent>
  625. </ReferentialConstraint>
  626. </Association>
  627. <Association Name="FK_ProductSale_Agent">
  628. <End Type="Model.Agent" Role="Agent" Multiplicity="1" />
  629. <End Type="Model.ProductSale" Role="ProductSale" Multiplicity="*" />
  630. <ReferentialConstraint>
  631. <Principal Role="Agent">
  632. <PropertyRef Name="ID" />
  633. </Principal>
  634. <Dependent Role="ProductSale">
  635. <PropertyRef Name="AgentID" />
  636. </Dependent>
  637. </ReferentialConstraint>
  638. </Association>
  639. <Association Name="FK_Shop_Agent">
  640. <End Type="Model.Agent" Role="Agent" Multiplicity="1" />
  641. <End Type="Model.Shop" Role="Shop" Multiplicity="*" />
  642. <ReferentialConstraint>
  643. <Principal Role="Agent">
  644. <PropertyRef Name="ID" />
  645. </Principal>
  646. <Dependent Role="Shop">
  647. <PropertyRef Name="AgentID" />
  648. </Dependent>
  649. </ReferentialConstraint>
  650. </Association>
  651. <Association Name="FK_Material_MaterialType">
  652. <End Type="Model.MaterialType" Role="MaterialType" Multiplicity="1" />
  653. <End Type="Model.Material" Role="Material" Multiplicity="*" />
  654. <ReferentialConstraint>
  655. <Principal Role="MaterialType">
  656. <PropertyRef Name="ID" />
  657. </Principal>
  658. <Dependent Role="Material">
  659. <PropertyRef Name="MaterialTypeID" />
  660. </Dependent>
  661. </ReferentialConstraint>
  662. </Association>
  663. <Association Name="FK_MaterialCountHistory_Material">
  664. <End Type="Model.Material" Role="Material" Multiplicity="1" />
  665. <End Type="Model.MaterialCountHistory" Role="MaterialCountHistory" Multiplicity="*" />
  666. <ReferentialConstraint>
  667. <Principal Role="Material">
  668. <PropertyRef Name="ID" />
  669. </Principal>
  670. <Dependent Role="MaterialCountHistory">
  671. <PropertyRef Name="MaterialID" />
  672. </Dependent>
  673. </ReferentialConstraint>
  674. </Association>
  675. <Association Name="FK_ProductMaterial_Material">
  676. <End Type="Model.Material" Role="Material" Multiplicity="1" />
  677. <End Type="Model.ProductMaterial" Role="ProductMaterial" Multiplicity="*" />
  678. <ReferentialConstraint>
  679. <Principal Role="Material">
  680. <PropertyRef Name="ID" />
  681. </Principal>
  682. <Dependent Role="ProductMaterial">
  683. <PropertyRef Name="MaterialID" />
  684. </Dependent>
  685. </ReferentialConstraint>
  686. </Association>
  687. <Association Name="FK_Product_ProductType">
  688. <End Type="Model.ProductType" Role="ProductType" Multiplicity="0..1" />
  689. <End Type="Model.Product" Role="Product" Multiplicity="*" />
  690. <ReferentialConstraint>
  691. <Principal Role="ProductType">
  692. <PropertyRef Name="ID" />
  693. </Principal>
  694. <Dependent Role="Product">
  695. <PropertyRef Name="ProductTypeID" />
  696. </Dependent>
  697. </ReferentialConstraint>
  698. </Association>
  699. <Association Name="FK_ProductCostHistory_Product">
  700. <End Type="Model.Product" Role="Product" Multiplicity="1" />
  701. <End Type="Model.ProductCostHistory" Role="ProductCostHistory" Multiplicity="*" />
  702. <ReferentialConstraint>
  703. <Principal Role="Product">
  704. <PropertyRef Name="ID" />
  705. </Principal>
  706. <Dependent Role="ProductCostHistory">
  707. <PropertyRef Name="ProductID" />
  708. </Dependent>
  709. </ReferentialConstraint>
  710. </Association>
  711. <Association Name="FK_ProductMaterial_Product">
  712. <End Type="Model.Product" Role="Product" Multiplicity="1">
  713. <OnDelete Action="Cascade" />
  714. </End>
  715. <End Type="Model.ProductMaterial" Role="ProductMaterial" Multiplicity="*" />
  716. <ReferentialConstraint>
  717. <Principal Role="Product">
  718. <PropertyRef Name="ID" />
  719. </Principal>
  720. <Dependent Role="ProductMaterial">
  721. <PropertyRef Name="ProductID" />
  722. </Dependent>
  723. </ReferentialConstraint>
  724. </Association>
  725. <Association Name="FK_ProductSale_Product">
  726. <End Type="Model.Product" Role="Product" Multiplicity="1" />
  727. <End Type="Model.ProductSale" Role="ProductSale" Multiplicity="*" />
  728. <ReferentialConstraint>
  729. <Principal Role="Product">
  730. <PropertyRef Name="ID" />
  731. </Principal>
  732. <Dependent Role="ProductSale">
  733. <PropertyRef Name="ProductID" />
  734. </Dependent>
  735. </ReferentialConstraint>
  736. </Association>
  737. <Association Name="MaterialSupplier">
  738. <End Type="Model.Material" Role="Material" Multiplicity="*" />
  739. <End Type="Model.Supplier" Role="Supplier" Multiplicity="*" />
  740. </Association>
  741. </Schema>
  742. </edmx:ConceptualModels>
  743. <!-- C-S mapping content -->
  744. <edmx:Mappings>
  745. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  746. <EntityContainerMapping StorageEntityContainer="Хранилище ModelContainer" CdmEntityContainer="Entities">
  747. <EntitySetMapping Name="Agent">
  748. <EntityTypeMapping TypeName="Model.Agent">
  749. <MappingFragment StoreEntitySet="Agent">
  750. <ScalarProperty Name="Priority" ColumnName="Priority" />
  751. <ScalarProperty Name="Logo" ColumnName="Logo" />
  752. <ScalarProperty Name="Email" ColumnName="Email" />
  753. <ScalarProperty Name="Phone" ColumnName="Phone" />
  754. <ScalarProperty Name="DirectorName" ColumnName="DirectorName" />
  755. <ScalarProperty Name="KPP" ColumnName="KPP" />
  756. <ScalarProperty Name="INN" ColumnName="INN" />
  757. <ScalarProperty Name="Address" ColumnName="Address" />
  758. <ScalarProperty Name="AgentTypeID" ColumnName="AgentTypeID" />
  759. <ScalarProperty Name="Title" ColumnName="Title" />
  760. <ScalarProperty Name="ID" ColumnName="ID" />
  761. </MappingFragment>
  762. </EntityTypeMapping>
  763. </EntitySetMapping>
  764. <EntitySetMapping Name="AgentPriorityHistory">
  765. <EntityTypeMapping TypeName="Model.AgentPriorityHistory">
  766. <MappingFragment StoreEntitySet="AgentPriorityHistory">
  767. <ScalarProperty Name="PriorityValue" ColumnName="PriorityValue" />
  768. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  769. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  770. <ScalarProperty Name="ID" ColumnName="ID" />
  771. </MappingFragment>
  772. </EntityTypeMapping>
  773. </EntitySetMapping>
  774. <EntitySetMapping Name="AgentType">
  775. <EntityTypeMapping TypeName="Model.AgentType">
  776. <MappingFragment StoreEntitySet="AgentType">
  777. <ScalarProperty Name="Image" ColumnName="Image" />
  778. <ScalarProperty Name="Title" ColumnName="Title" />
  779. <ScalarProperty Name="ID" ColumnName="ID" />
  780. </MappingFragment>
  781. </EntityTypeMapping>
  782. </EntitySetMapping>
  783. <EntitySetMapping Name="Material">
  784. <EntityTypeMapping TypeName="Model.Material">
  785. <MappingFragment StoreEntitySet="Material">
  786. <ScalarProperty Name="MaterialTypeID" ColumnName="MaterialTypeID" />
  787. <ScalarProperty Name="Image" ColumnName="Image" />
  788. <ScalarProperty Name="Cost" ColumnName="Cost" />
  789. <ScalarProperty Name="Description" ColumnName="Description" />
  790. <ScalarProperty Name="MinCount" ColumnName="MinCount" />
  791. <ScalarProperty Name="CountInStock" ColumnName="CountInStock" />
  792. <ScalarProperty Name="Unit" ColumnName="Unit" />
  793. <ScalarProperty Name="CountInPack" ColumnName="CountInPack" />
  794. <ScalarProperty Name="Title" ColumnName="Title" />
  795. <ScalarProperty Name="ID" ColumnName="ID" />
  796. </MappingFragment>
  797. </EntityTypeMapping>
  798. </EntitySetMapping>
  799. <EntitySetMapping Name="MaterialCountHistory">
  800. <EntityTypeMapping TypeName="Model.MaterialCountHistory">
  801. <MappingFragment StoreEntitySet="MaterialCountHistory">
  802. <ScalarProperty Name="CountValue" ColumnName="CountValue" />
  803. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  804. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  805. <ScalarProperty Name="ID" ColumnName="ID" />
  806. </MappingFragment>
  807. </EntityTypeMapping>
  808. </EntitySetMapping>
  809. <EntitySetMapping Name="MaterialType">
  810. <EntityTypeMapping TypeName="Model.MaterialType">
  811. <MappingFragment StoreEntitySet="MaterialType">
  812. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  813. <ScalarProperty Name="Title" ColumnName="Title" />
  814. <ScalarProperty Name="ID" ColumnName="ID" />
  815. </MappingFragment>
  816. </EntityTypeMapping>
  817. </EntitySetMapping>
  818. <EntitySetMapping Name="Product">
  819. <EntityTypeMapping TypeName="Model.Product">
  820. <MappingFragment StoreEntitySet="Product">
  821. <ScalarProperty Name="MinCostForAgent" ColumnName="MinCostForAgent" />
  822. <ScalarProperty Name="ProductionWorkshopNumber" ColumnName="ProductionWorkshopNumber" />
  823. <ScalarProperty Name="ProductionPersonCount" ColumnName="ProductionPersonCount" />
  824. <ScalarProperty Name="Image" ColumnName="Image" />
  825. <ScalarProperty Name="Description" ColumnName="Description" />
  826. <ScalarProperty Name="ArticleNumber" ColumnName="ArticleNumber" />
  827. <ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
  828. <ScalarProperty Name="Title" ColumnName="Title" />
  829. <ScalarProperty Name="ID" ColumnName="ID" />
  830. </MappingFragment>
  831. </EntityTypeMapping>
  832. </EntitySetMapping>
  833. <EntitySetMapping Name="ProductCostHistory">
  834. <EntityTypeMapping TypeName="Model.ProductCostHistory">
  835. <MappingFragment StoreEntitySet="ProductCostHistory">
  836. <ScalarProperty Name="CostValue" ColumnName="CostValue" />
  837. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  838. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  839. <ScalarProperty Name="ID" ColumnName="ID" />
  840. </MappingFragment>
  841. </EntityTypeMapping>
  842. </EntitySetMapping>
  843. <EntitySetMapping Name="ProductMaterial">
  844. <EntityTypeMapping TypeName="Model.ProductMaterial">
  845. <MappingFragment StoreEntitySet="ProductMaterial">
  846. <ScalarProperty Name="Count" ColumnName="Count" />
  847. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  848. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  849. <ScalarProperty Name="ID" ColumnName="ID" />
  850. </MappingFragment>
  851. </EntityTypeMapping>
  852. </EntitySetMapping>
  853. <EntitySetMapping Name="ProductSale">
  854. <EntityTypeMapping TypeName="Model.ProductSale">
  855. <MappingFragment StoreEntitySet="ProductSale">
  856. <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
  857. <ScalarProperty Name="SaleDate" ColumnName="SaleDate" />
  858. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  859. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  860. <ScalarProperty Name="ID" ColumnName="ID" />
  861. </MappingFragment>
  862. </EntityTypeMapping>
  863. </EntitySetMapping>
  864. <EntitySetMapping Name="ProductType">
  865. <EntityTypeMapping TypeName="Model.ProductType">
  866. <MappingFragment StoreEntitySet="ProductType">
  867. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  868. <ScalarProperty Name="Title" ColumnName="Title" />
  869. <ScalarProperty Name="ID" ColumnName="ID" />
  870. </MappingFragment>
  871. </EntityTypeMapping>
  872. </EntitySetMapping>
  873. <EntitySetMapping Name="Shop">
  874. <EntityTypeMapping TypeName="Model.Shop">
  875. <MappingFragment StoreEntitySet="Shop">
  876. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  877. <ScalarProperty Name="Address" ColumnName="Address" />
  878. <ScalarProperty Name="Title" ColumnName="Title" />
  879. <ScalarProperty Name="ID" ColumnName="ID" />
  880. </MappingFragment>
  881. </EntityTypeMapping>
  882. </EntitySetMapping>
  883. <EntitySetMapping Name="Supplier">
  884. <EntityTypeMapping TypeName="Model.Supplier">
  885. <MappingFragment StoreEntitySet="Supplier">
  886. <ScalarProperty Name="SupplierType" ColumnName="SupplierType" />
  887. <ScalarProperty Name="QualityRating" ColumnName="QualityRating" />
  888. <ScalarProperty Name="StartDate" ColumnName="StartDate" />
  889. <ScalarProperty Name="INN" ColumnName="INN" />
  890. <ScalarProperty Name="Title" ColumnName="Title" />
  891. <ScalarProperty Name="ID" ColumnName="ID" />
  892. </MappingFragment>
  893. </EntityTypeMapping>
  894. </EntitySetMapping>
  895. <AssociationSetMapping Name="MaterialSupplier" TypeName="Model.MaterialSupplier" StoreEntitySet="MaterialSupplier">
  896. <EndProperty Name="Supplier">
  897. <ScalarProperty Name="ID" ColumnName="SupplierID" />
  898. </EndProperty>
  899. <EndProperty Name="Material">
  900. <ScalarProperty Name="ID" ColumnName="MaterialID" />
  901. </EndProperty>
  902. </AssociationSetMapping>
  903. </EntityContainerMapping>
  904. </Mapping>
  905. </edmx:Mappings>
  906. </edmx:Runtime>
  907. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  908. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  909. <Connection>
  910. <DesignerInfoPropertySet>
  911. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  912. </DesignerInfoPropertySet>
  913. </Connection>
  914. <Options>
  915. <DesignerInfoPropertySet>
  916. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  917. <DesignerProperty Name="EnablePluralization" Value="false" />
  918. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  919. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  920. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  921. </DesignerInfoPropertySet>
  922. </Options>
  923. <!-- Diagram content (shape and connector positions) -->
  924. <Diagrams></Diagrams>
  925. </Designer>
  926. </edmx:Edmx>