Model1.edmx 51 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922
  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="Хранилище user5Model" 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" Nullable="false" />
  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" />
  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="ProductID" />
  107. <PropertyRef Name="MaterialID" />
  108. </Key>
  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. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  262. <ReferentialConstraint>
  263. <Principal Role="Product">
  264. <PropertyRef Name="ID" />
  265. </Principal>
  266. <Dependent Role="ProductMaterial">
  267. <PropertyRef Name="ProductID" />
  268. </Dependent>
  269. </ReferentialConstraint>
  270. </Association>
  271. <Association Name="FK_ProductSale_Agent">
  272. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  273. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  274. <ReferentialConstraint>
  275. <Principal Role="Agent">
  276. <PropertyRef Name="ID" />
  277. </Principal>
  278. <Dependent Role="ProductSale">
  279. <PropertyRef Name="AgentID" />
  280. </Dependent>
  281. </ReferentialConstraint>
  282. </Association>
  283. <Association Name="FK_ProductSale_Product">
  284. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  285. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  286. <ReferentialConstraint>
  287. <Principal Role="Product">
  288. <PropertyRef Name="ID" />
  289. </Principal>
  290. <Dependent Role="ProductSale">
  291. <PropertyRef Name="ProductID" />
  292. </Dependent>
  293. </ReferentialConstraint>
  294. </Association>
  295. <Association Name="FK_Shop_Agent">
  296. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  297. <End Role="Shop" Type="Self.Shop" Multiplicity="*" />
  298. <ReferentialConstraint>
  299. <Principal Role="Agent">
  300. <PropertyRef Name="ID" />
  301. </Principal>
  302. <Dependent Role="Shop">
  303. <PropertyRef Name="AgentID" />
  304. </Dependent>
  305. </ReferentialConstraint>
  306. </Association>
  307. <EntityContainer Name="Хранилище user5ModelContainer">
  308. <EntitySet Name="Agent" EntityType="Self.Agent" Schema="dbo" store:Type="Tables" />
  309. <EntitySet Name="AgentPriorityHistory" EntityType="Self.AgentPriorityHistory" Schema="dbo" store:Type="Tables" />
  310. <EntitySet Name="AgentType" EntityType="Self.AgentType" Schema="dbo" store:Type="Tables" />
  311. <EntitySet Name="Material" EntityType="Self.Material" Schema="dbo" store:Type="Tables" />
  312. <EntitySet Name="MaterialCountHistory" EntityType="Self.MaterialCountHistory" Schema="dbo" store:Type="Tables" />
  313. <EntitySet Name="MaterialSupplier" EntityType="Self.MaterialSupplier" Schema="dbo" store:Type="Tables" />
  314. <EntitySet Name="MaterialType" EntityType="Self.MaterialType" Schema="dbo" store:Type="Tables" />
  315. <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
  316. <EntitySet Name="ProductCostHistory" EntityType="Self.ProductCostHistory" Schema="dbo" store:Type="Tables" />
  317. <EntitySet Name="ProductMaterial" EntityType="Self.ProductMaterial" Schema="dbo" store:Type="Tables" />
  318. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" Schema="dbo" store:Type="Tables" />
  319. <EntitySet Name="ProductType" EntityType="Self.ProductType" Schema="dbo" store:Type="Tables" />
  320. <EntitySet Name="Shop" EntityType="Self.Shop" Schema="dbo" store:Type="Tables" />
  321. <EntitySet Name="Supplier" EntityType="Self.Supplier" Schema="dbo" store:Type="Tables" />
  322. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  323. <End Role="AgentType" EntitySet="AgentType" />
  324. <End Role="Agent" EntitySet="Agent" />
  325. </AssociationSet>
  326. <AssociationSet Name="FK_AgentPriorityHistory_Agent" Association="Self.FK_AgentPriorityHistory_Agent">
  327. <End Role="Agent" EntitySet="Agent" />
  328. <End Role="AgentPriorityHistory" EntitySet="AgentPriorityHistory" />
  329. </AssociationSet>
  330. <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
  331. <End Role="MaterialType" EntitySet="MaterialType" />
  332. <End Role="Material" EntitySet="Material" />
  333. </AssociationSet>
  334. <AssociationSet Name="FK_MaterialCountHistory_Material" Association="Self.FK_MaterialCountHistory_Material">
  335. <End Role="Material" EntitySet="Material" />
  336. <End Role="MaterialCountHistory" EntitySet="MaterialCountHistory" />
  337. </AssociationSet>
  338. <AssociationSet Name="FK_MaterialSupplier_Material" Association="Self.FK_MaterialSupplier_Material">
  339. <End Role="Material" EntitySet="Material" />
  340. <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
  341. </AssociationSet>
  342. <AssociationSet Name="FK_MaterialSupplier_Supplier" Association="Self.FK_MaterialSupplier_Supplier">
  343. <End Role="Supplier" EntitySet="Supplier" />
  344. <End Role="MaterialSupplier" EntitySet="MaterialSupplier" />
  345. </AssociationSet>
  346. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  347. <End Role="ProductType" EntitySet="ProductType" />
  348. <End Role="Product" EntitySet="Product" />
  349. </AssociationSet>
  350. <AssociationSet Name="FK_ProductCostHistory_Product" Association="Self.FK_ProductCostHistory_Product">
  351. <End Role="Product" EntitySet="Product" />
  352. <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
  353. </AssociationSet>
  354. <AssociationSet Name="FK_ProductMaterial_Material" Association="Self.FK_ProductMaterial_Material">
  355. <End Role="Material" EntitySet="Material" />
  356. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  357. </AssociationSet>
  358. <AssociationSet Name="FK_ProductMaterial_Product" Association="Self.FK_ProductMaterial_Product">
  359. <End Role="Product" EntitySet="Product" />
  360. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  361. </AssociationSet>
  362. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  363. <End Role="Agent" EntitySet="Agent" />
  364. <End Role="ProductSale" EntitySet="ProductSale" />
  365. </AssociationSet>
  366. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  367. <End Role="Product" EntitySet="Product" />
  368. <End Role="ProductSale" EntitySet="ProductSale" />
  369. </AssociationSet>
  370. <AssociationSet Name="FK_Shop_Agent" Association="Self.FK_Shop_Agent">
  371. <End Role="Agent" EntitySet="Agent" />
  372. <End Role="Shop" EntitySet="Shop" />
  373. </AssociationSet>
  374. </EntityContainer>
  375. </Schema>
  376. </edmx:StorageModels>
  377. <!-- CSDL content -->
  378. <edmx:ConceptualModels>
  379. <Schema Namespace="user5Model" 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">
  380. <EntityType Name="Agent">
  381. <Key>
  382. <PropertyRef Name="ID" />
  383. </Key>
  384. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  385. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  386. <Property Name="AgentTypeID" Type="Int32" Nullable="false" />
  387. <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
  388. <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
  389. <Property Name="KPP" Type="String" MaxLength="9" FixedLength="false" Unicode="false" />
  390. <Property Name="DirectorName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  391. <Property Name="Phone" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  392. <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
  393. <Property Name="Logo" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  394. <Property Name="Priority" Type="Int32" Nullable="false" />
  395. <NavigationProperty Name="AgentType" Relationship="Self.FK_Agent_AgentType" FromRole="Agent" ToRole="AgentType" />
  396. <NavigationProperty Name="AgentPriorityHistory" Relationship="Self.FK_AgentPriorityHistory_Agent" FromRole="Agent" ToRole="AgentPriorityHistory" />
  397. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Agent" FromRole="Agent" ToRole="ProductSale" />
  398. <NavigationProperty Name="Shop" Relationship="Self.FK_Shop_Agent" FromRole="Agent" ToRole="Shop" />
  399. </EntityType>
  400. <EntityType Name="AgentPriorityHistory">
  401. <Key>
  402. <PropertyRef Name="ID" />
  403. </Key>
  404. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  405. <Property Name="AgentID" Type="Int32" Nullable="false" />
  406. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  407. <Property Name="PriorityValue" Type="Int32" Nullable="false" />
  408. <NavigationProperty Name="Agent" Relationship="Self.FK_AgentPriorityHistory_Agent" FromRole="AgentPriorityHistory" ToRole="Agent" />
  409. </EntityType>
  410. <EntityType Name="AgentType">
  411. <Key>
  412. <PropertyRef Name="ID" />
  413. </Key>
  414. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  415. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  416. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  417. <NavigationProperty Name="Agent" Relationship="Self.FK_Agent_AgentType" FromRole="AgentType" ToRole="Agent" />
  418. </EntityType>
  419. <EntityType Name="Material">
  420. <Key>
  421. <PropertyRef Name="ID" />
  422. </Key>
  423. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  424. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  425. <Property Name="CountInPack" Type="Int32" Nullable="false" />
  426. <Property Name="Unit" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
  427. <Property Name="CountInStock" Type="Double" />
  428. <Property Name="MinCount" Type="Double" Nullable="false" />
  429. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  430. <Property Name="Cost" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  431. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  432. <Property Name="MaterialTypeID" Type="Int32" Nullable="false" />
  433. <NavigationProperty Name="MaterialType" Relationship="Self.FK_Material_MaterialType" FromRole="Material" ToRole="MaterialType" />
  434. <NavigationProperty Name="MaterialCountHistory" Relationship="Self.FK_MaterialCountHistory_Material" FromRole="Material" ToRole="MaterialCountHistory" />
  435. <NavigationProperty Name="ProductMaterial" Relationship="Self.FK_ProductMaterial_Material" FromRole="Material" ToRole="ProductMaterial" />
  436. <NavigationProperty Name="Supplier" Relationship="Self.MaterialSupplier" FromRole="Material" ToRole="Supplier" />
  437. </EntityType>
  438. <EntityType Name="MaterialCountHistory">
  439. <Key>
  440. <PropertyRef Name="ID" />
  441. </Key>
  442. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  443. <Property Name="MaterialID" Type="Int32" Nullable="false" />
  444. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  445. <Property Name="CountValue" Type="Double" Nullable="false" />
  446. <NavigationProperty Name="Material" Relationship="Self.FK_MaterialCountHistory_Material" FromRole="MaterialCountHistory" ToRole="Material" />
  447. </EntityType>
  448. <EntityType Name="MaterialType">
  449. <Key>
  450. <PropertyRef Name="ID" />
  451. </Key>
  452. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  453. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  454. <Property Name="DefectedPercent" Type="Double" Nullable="false" />
  455. <NavigationProperty Name="Material" Relationship="Self.FK_Material_MaterialType" FromRole="MaterialType" ToRole="Material" />
  456. </EntityType>
  457. <EntityType Name="Product">
  458. <Key>
  459. <PropertyRef Name="ID" />
  460. </Key>
  461. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  462. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  463. <Property Name="ProductTypeID" Type="Int32" />
  464. <Property Name="ArticleNumber" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
  465. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  466. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  467. <Property Name="ProductionPersonCount" Type="Int32" />
  468. <Property Name="ProductionWorkshopNumber" Type="Int32" />
  469. <Property Name="MinCostForAgent" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  470. <NavigationProperty Name="ProductType" Relationship="Self.FK_Product_ProductType" FromRole="Product" ToRole="ProductType" />
  471. <NavigationProperty Name="ProductCostHistory" Relationship="Self.FK_ProductCostHistory_Product" FromRole="Product" ToRole="ProductCostHistory" />
  472. <NavigationProperty Name="ProductMaterial" Relationship="Self.FK_ProductMaterial_Product" FromRole="Product" ToRole="ProductMaterial" />
  473. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Product" FromRole="Product" ToRole="ProductSale" />
  474. </EntityType>
  475. <EntityType Name="ProductCostHistory">
  476. <Key>
  477. <PropertyRef Name="ID" />
  478. </Key>
  479. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  480. <Property Name="ProductID" Type="Int32" Nullable="false" />
  481. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  482. <Property Name="CostValue" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  483. <NavigationProperty Name="Product" Relationship="Self.FK_ProductCostHistory_Product" FromRole="ProductCostHistory" ToRole="Product" />
  484. </EntityType>
  485. <EntityType Name="ProductMaterial">
  486. <Key>
  487. <PropertyRef Name="ProductID" />
  488. <PropertyRef Name="MaterialID" />
  489. </Key>
  490. <Property Name="ProductID" Type="Int32" Nullable="false" />
  491. <Property Name="MaterialID" Type="Int32" Nullable="false" />
  492. <Property Name="Count" Type="Double" />
  493. <NavigationProperty Name="Material" Relationship="Self.FK_ProductMaterial_Material" FromRole="ProductMaterial" ToRole="Material" />
  494. <NavigationProperty Name="Product" Relationship="Self.FK_ProductMaterial_Product" FromRole="ProductMaterial" ToRole="Product" />
  495. </EntityType>
  496. <EntityType Name="ProductSale">
  497. <Key>
  498. <PropertyRef Name="ID" />
  499. </Key>
  500. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  501. <Property Name="AgentID" Type="Int32" Nullable="false" />
  502. <Property Name="ProductID" Type="Int32" Nullable="false" />
  503. <Property Name="SaleDate" Type="DateTime" Nullable="false" Precision="0" />
  504. <Property Name="ProductCount" Type="Int32" Nullable="false" />
  505. <NavigationProperty Name="Agent" Relationship="Self.FK_ProductSale_Agent" FromRole="ProductSale" ToRole="Agent" />
  506. <NavigationProperty Name="Product" Relationship="Self.FK_ProductSale_Product" FromRole="ProductSale" ToRole="Product" />
  507. </EntityType>
  508. <EntityType Name="ProductType">
  509. <Key>
  510. <PropertyRef Name="ID" />
  511. </Key>
  512. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  513. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  514. <Property Name="DefectedPercent" Type="Double" />
  515. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductType" FromRole="ProductType" ToRole="Product" />
  516. </EntityType>
  517. <EntityType Name="Shop">
  518. <Key>
  519. <PropertyRef Name="ID" />
  520. </Key>
  521. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  522. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  523. <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
  524. <Property Name="AgentID" Type="Int32" Nullable="false" />
  525. <NavigationProperty Name="Agent" Relationship="Self.FK_Shop_Agent" FromRole="Shop" ToRole="Agent" />
  526. </EntityType>
  527. <EntityType Name="Supplier">
  528. <Key>
  529. <PropertyRef Name="ID" />
  530. </Key>
  531. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  532. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  533. <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
  534. <Property Name="StartDate" Type="DateTime" Nullable="false" Precision="0" />
  535. <Property Name="QualityRating" Type="Int32" />
  536. <Property Name="SupplierType" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
  537. <NavigationProperty Name="Material" Relationship="Self.MaterialSupplier" FromRole="Supplier" ToRole="Material" />
  538. </EntityType>
  539. <Association Name="FK_Agent_AgentType">
  540. <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
  541. <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
  542. <ReferentialConstraint>
  543. <Principal Role="AgentType">
  544. <PropertyRef Name="ID" />
  545. </Principal>
  546. <Dependent Role="Agent">
  547. <PropertyRef Name="AgentTypeID" />
  548. </Dependent>
  549. </ReferentialConstraint>
  550. </Association>
  551. <Association Name="FK_AgentPriorityHistory_Agent">
  552. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  553. <End Role="AgentPriorityHistory" Type="Self.AgentPriorityHistory" Multiplicity="*" />
  554. <ReferentialConstraint>
  555. <Principal Role="Agent">
  556. <PropertyRef Name="ID" />
  557. </Principal>
  558. <Dependent Role="AgentPriorityHistory">
  559. <PropertyRef Name="AgentID" />
  560. </Dependent>
  561. </ReferentialConstraint>
  562. </Association>
  563. <Association Name="FK_ProductSale_Agent">
  564. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  565. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  566. <ReferentialConstraint>
  567. <Principal Role="Agent">
  568. <PropertyRef Name="ID" />
  569. </Principal>
  570. <Dependent Role="ProductSale">
  571. <PropertyRef Name="AgentID" />
  572. </Dependent>
  573. </ReferentialConstraint>
  574. </Association>
  575. <Association Name="FK_Shop_Agent">
  576. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  577. <End Role="Shop" Type="Self.Shop" Multiplicity="*" />
  578. <ReferentialConstraint>
  579. <Principal Role="Agent">
  580. <PropertyRef Name="ID" />
  581. </Principal>
  582. <Dependent Role="Shop">
  583. <PropertyRef Name="AgentID" />
  584. </Dependent>
  585. </ReferentialConstraint>
  586. </Association>
  587. <Association Name="FK_Material_MaterialType">
  588. <End Role="MaterialType" Type="Self.MaterialType" Multiplicity="1" />
  589. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  590. <ReferentialConstraint>
  591. <Principal Role="MaterialType">
  592. <PropertyRef Name="ID" />
  593. </Principal>
  594. <Dependent Role="Material">
  595. <PropertyRef Name="MaterialTypeID" />
  596. </Dependent>
  597. </ReferentialConstraint>
  598. </Association>
  599. <Association Name="FK_MaterialCountHistory_Material">
  600. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  601. <End Role="MaterialCountHistory" Type="Self.MaterialCountHistory" Multiplicity="*" />
  602. <ReferentialConstraint>
  603. <Principal Role="Material">
  604. <PropertyRef Name="ID" />
  605. </Principal>
  606. <Dependent Role="MaterialCountHistory">
  607. <PropertyRef Name="MaterialID" />
  608. </Dependent>
  609. </ReferentialConstraint>
  610. </Association>
  611. <Association Name="FK_ProductMaterial_Material">
  612. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  613. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  614. <ReferentialConstraint>
  615. <Principal Role="Material">
  616. <PropertyRef Name="ID" />
  617. </Principal>
  618. <Dependent Role="ProductMaterial">
  619. <PropertyRef Name="MaterialID" />
  620. </Dependent>
  621. </ReferentialConstraint>
  622. </Association>
  623. <Association Name="FK_Product_ProductType">
  624. <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
  625. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  626. <ReferentialConstraint>
  627. <Principal Role="ProductType">
  628. <PropertyRef Name="ID" />
  629. </Principal>
  630. <Dependent Role="Product">
  631. <PropertyRef Name="ProductTypeID" />
  632. </Dependent>
  633. </ReferentialConstraint>
  634. </Association>
  635. <Association Name="FK_ProductCostHistory_Product">
  636. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  637. <End Role="ProductCostHistory" Type="Self.ProductCostHistory" Multiplicity="*" />
  638. <ReferentialConstraint>
  639. <Principal Role="Product">
  640. <PropertyRef Name="ID" />
  641. </Principal>
  642. <Dependent Role="ProductCostHistory">
  643. <PropertyRef Name="ProductID" />
  644. </Dependent>
  645. </ReferentialConstraint>
  646. </Association>
  647. <Association Name="FK_ProductMaterial_Product">
  648. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  649. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  650. <ReferentialConstraint>
  651. <Principal Role="Product">
  652. <PropertyRef Name="ID" />
  653. </Principal>
  654. <Dependent Role="ProductMaterial">
  655. <PropertyRef Name="ProductID" />
  656. </Dependent>
  657. </ReferentialConstraint>
  658. </Association>
  659. <Association Name="FK_ProductSale_Product">
  660. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  661. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  662. <ReferentialConstraint>
  663. <Principal Role="Product">
  664. <PropertyRef Name="ID" />
  665. </Principal>
  666. <Dependent Role="ProductSale">
  667. <PropertyRef Name="ProductID" />
  668. </Dependent>
  669. </ReferentialConstraint>
  670. </Association>
  671. <Association Name="MaterialSupplier">
  672. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  673. <End Role="Supplier" Type="Self.Supplier" Multiplicity="*" />
  674. </Association>
  675. <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
  676. <EntitySet Name="Agent" EntityType="Self.Agent" />
  677. <EntitySet Name="AgentPriorityHistory" EntityType="Self.AgentPriorityHistory" />
  678. <EntitySet Name="AgentType" EntityType="Self.AgentType" />
  679. <EntitySet Name="Material" EntityType="Self.Material" />
  680. <EntitySet Name="MaterialCountHistory" EntityType="Self.MaterialCountHistory" />
  681. <EntitySet Name="MaterialType" EntityType="Self.MaterialType" />
  682. <EntitySet Name="Product" EntityType="Self.Product" />
  683. <EntitySet Name="ProductCostHistory" EntityType="Self.ProductCostHistory" />
  684. <EntitySet Name="ProductMaterial" EntityType="Self.ProductMaterial" />
  685. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" />
  686. <EntitySet Name="ProductType" EntityType="Self.ProductType" />
  687. <EntitySet Name="Shop" EntityType="Self.Shop" />
  688. <EntitySet Name="Supplier" EntityType="Self.Supplier" />
  689. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  690. <End Role="AgentType" EntitySet="AgentType" />
  691. <End Role="Agent" EntitySet="Agent" />
  692. </AssociationSet>
  693. <AssociationSet Name="FK_AgentPriorityHistory_Agent" Association="Self.FK_AgentPriorityHistory_Agent">
  694. <End Role="Agent" EntitySet="Agent" />
  695. <End Role="AgentPriorityHistory" EntitySet="AgentPriorityHistory" />
  696. </AssociationSet>
  697. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  698. <End Role="Agent" EntitySet="Agent" />
  699. <End Role="ProductSale" EntitySet="ProductSale" />
  700. </AssociationSet>
  701. <AssociationSet Name="FK_Shop_Agent" Association="Self.FK_Shop_Agent">
  702. <End Role="Agent" EntitySet="Agent" />
  703. <End Role="Shop" EntitySet="Shop" />
  704. </AssociationSet>
  705. <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
  706. <End Role="MaterialType" EntitySet="MaterialType" />
  707. <End Role="Material" EntitySet="Material" />
  708. </AssociationSet>
  709. <AssociationSet Name="FK_MaterialCountHistory_Material" Association="Self.FK_MaterialCountHistory_Material">
  710. <End Role="Material" EntitySet="Material" />
  711. <End Role="MaterialCountHistory" EntitySet="MaterialCountHistory" />
  712. </AssociationSet>
  713. <AssociationSet Name="FK_ProductMaterial_Material" Association="Self.FK_ProductMaterial_Material">
  714. <End Role="Material" EntitySet="Material" />
  715. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  716. </AssociationSet>
  717. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  718. <End Role="ProductType" EntitySet="ProductType" />
  719. <End Role="Product" EntitySet="Product" />
  720. </AssociationSet>
  721. <AssociationSet Name="FK_ProductCostHistory_Product" Association="Self.FK_ProductCostHistory_Product">
  722. <End Role="Product" EntitySet="Product" />
  723. <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
  724. </AssociationSet>
  725. <AssociationSet Name="FK_ProductMaterial_Product" Association="Self.FK_ProductMaterial_Product">
  726. <End Role="Product" EntitySet="Product" />
  727. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  728. </AssociationSet>
  729. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  730. <End Role="Product" EntitySet="Product" />
  731. <End Role="ProductSale" EntitySet="ProductSale" />
  732. </AssociationSet>
  733. <AssociationSet Name="MaterialSupplier" Association="Self.MaterialSupplier">
  734. <End Role="Material" EntitySet="Material" />
  735. <End Role="Supplier" EntitySet="Supplier" />
  736. </AssociationSet>
  737. </EntityContainer>
  738. </Schema>
  739. </edmx:ConceptualModels>
  740. <!-- C-S mapping content -->
  741. <edmx:Mappings>
  742. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  743. <EntityContainerMapping StorageEntityContainer="Хранилище user5ModelContainer" CdmEntityContainer="Entities">
  744. <EntitySetMapping Name="Agent">
  745. <EntityTypeMapping TypeName="user5Model.Agent">
  746. <MappingFragment StoreEntitySet="Agent">
  747. <ScalarProperty Name="ID" ColumnName="ID" />
  748. <ScalarProperty Name="Title" ColumnName="Title" />
  749. <ScalarProperty Name="AgentTypeID" ColumnName="AgentTypeID" />
  750. <ScalarProperty Name="Address" ColumnName="Address" />
  751. <ScalarProperty Name="INN" ColumnName="INN" />
  752. <ScalarProperty Name="KPP" ColumnName="KPP" />
  753. <ScalarProperty Name="DirectorName" ColumnName="DirectorName" />
  754. <ScalarProperty Name="Phone" ColumnName="Phone" />
  755. <ScalarProperty Name="Email" ColumnName="Email" />
  756. <ScalarProperty Name="Logo" ColumnName="Logo" />
  757. <ScalarProperty Name="Priority" ColumnName="Priority" />
  758. </MappingFragment>
  759. </EntityTypeMapping>
  760. </EntitySetMapping>
  761. <EntitySetMapping Name="AgentPriorityHistory">
  762. <EntityTypeMapping TypeName="user5Model.AgentPriorityHistory">
  763. <MappingFragment StoreEntitySet="AgentPriorityHistory">
  764. <ScalarProperty Name="ID" ColumnName="ID" />
  765. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  766. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  767. <ScalarProperty Name="PriorityValue" ColumnName="PriorityValue" />
  768. </MappingFragment>
  769. </EntityTypeMapping>
  770. </EntitySetMapping>
  771. <EntitySetMapping Name="AgentType">
  772. <EntityTypeMapping TypeName="user5Model.AgentType">
  773. <MappingFragment StoreEntitySet="AgentType">
  774. <ScalarProperty Name="ID" ColumnName="ID" />
  775. <ScalarProperty Name="Title" ColumnName="Title" />
  776. <ScalarProperty Name="Image" ColumnName="Image" />
  777. </MappingFragment>
  778. </EntityTypeMapping>
  779. </EntitySetMapping>
  780. <EntitySetMapping Name="Material">
  781. <EntityTypeMapping TypeName="user5Model.Material">
  782. <MappingFragment StoreEntitySet="Material">
  783. <ScalarProperty Name="ID" ColumnName="ID" />
  784. <ScalarProperty Name="Title" ColumnName="Title" />
  785. <ScalarProperty Name="CountInPack" ColumnName="CountInPack" />
  786. <ScalarProperty Name="Unit" ColumnName="Unit" />
  787. <ScalarProperty Name="CountInStock" ColumnName="CountInStock" />
  788. <ScalarProperty Name="MinCount" ColumnName="MinCount" />
  789. <ScalarProperty Name="Description" ColumnName="Description" />
  790. <ScalarProperty Name="Cost" ColumnName="Cost" />
  791. <ScalarProperty Name="Image" ColumnName="Image" />
  792. <ScalarProperty Name="MaterialTypeID" ColumnName="MaterialTypeID" />
  793. </MappingFragment>
  794. </EntityTypeMapping>
  795. </EntitySetMapping>
  796. <EntitySetMapping Name="MaterialCountHistory">
  797. <EntityTypeMapping TypeName="user5Model.MaterialCountHistory">
  798. <MappingFragment StoreEntitySet="MaterialCountHistory">
  799. <ScalarProperty Name="ID" ColumnName="ID" />
  800. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  801. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  802. <ScalarProperty Name="CountValue" ColumnName="CountValue" />
  803. </MappingFragment>
  804. </EntityTypeMapping>
  805. </EntitySetMapping>
  806. <EntitySetMapping Name="MaterialType">
  807. <EntityTypeMapping TypeName="user5Model.MaterialType">
  808. <MappingFragment StoreEntitySet="MaterialType">
  809. <ScalarProperty Name="ID" ColumnName="ID" />
  810. <ScalarProperty Name="Title" ColumnName="Title" />
  811. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  812. </MappingFragment>
  813. </EntityTypeMapping>
  814. </EntitySetMapping>
  815. <EntitySetMapping Name="Product">
  816. <EntityTypeMapping TypeName="user5Model.Product">
  817. <MappingFragment StoreEntitySet="Product">
  818. <ScalarProperty Name="ID" ColumnName="ID" />
  819. <ScalarProperty Name="Title" ColumnName="Title" />
  820. <ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
  821. <ScalarProperty Name="ArticleNumber" ColumnName="ArticleNumber" />
  822. <ScalarProperty Name="Description" ColumnName="Description" />
  823. <ScalarProperty Name="Image" ColumnName="Image" />
  824. <ScalarProperty Name="ProductionPersonCount" ColumnName="ProductionPersonCount" />
  825. <ScalarProperty Name="ProductionWorkshopNumber" ColumnName="ProductionWorkshopNumber" />
  826. <ScalarProperty Name="MinCostForAgent" ColumnName="MinCostForAgent" />
  827. </MappingFragment>
  828. </EntityTypeMapping>
  829. </EntitySetMapping>
  830. <EntitySetMapping Name="ProductCostHistory">
  831. <EntityTypeMapping TypeName="user5Model.ProductCostHistory">
  832. <MappingFragment StoreEntitySet="ProductCostHistory">
  833. <ScalarProperty Name="ID" ColumnName="ID" />
  834. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  835. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  836. <ScalarProperty Name="CostValue" ColumnName="CostValue" />
  837. </MappingFragment>
  838. </EntityTypeMapping>
  839. </EntitySetMapping>
  840. <EntitySetMapping Name="ProductMaterial">
  841. <EntityTypeMapping TypeName="user5Model.ProductMaterial">
  842. <MappingFragment StoreEntitySet="ProductMaterial">
  843. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  844. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  845. <ScalarProperty Name="Count" ColumnName="Count" />
  846. </MappingFragment>
  847. </EntityTypeMapping>
  848. </EntitySetMapping>
  849. <EntitySetMapping Name="ProductSale">
  850. <EntityTypeMapping TypeName="user5Model.ProductSale">
  851. <MappingFragment StoreEntitySet="ProductSale">
  852. <ScalarProperty Name="ID" ColumnName="ID" />
  853. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  854. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  855. <ScalarProperty Name="SaleDate" ColumnName="SaleDate" />
  856. <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
  857. </MappingFragment>
  858. </EntityTypeMapping>
  859. </EntitySetMapping>
  860. <EntitySetMapping Name="ProductType">
  861. <EntityTypeMapping TypeName="user5Model.ProductType">
  862. <MappingFragment StoreEntitySet="ProductType">
  863. <ScalarProperty Name="ID" ColumnName="ID" />
  864. <ScalarProperty Name="Title" ColumnName="Title" />
  865. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  866. </MappingFragment>
  867. </EntityTypeMapping>
  868. </EntitySetMapping>
  869. <EntitySetMapping Name="Shop">
  870. <EntityTypeMapping TypeName="user5Model.Shop">
  871. <MappingFragment StoreEntitySet="Shop">
  872. <ScalarProperty Name="ID" ColumnName="ID" />
  873. <ScalarProperty Name="Title" ColumnName="Title" />
  874. <ScalarProperty Name="Address" ColumnName="Address" />
  875. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  876. </MappingFragment>
  877. </EntityTypeMapping>
  878. </EntitySetMapping>
  879. <EntitySetMapping Name="Supplier">
  880. <EntityTypeMapping TypeName="user5Model.Supplier">
  881. <MappingFragment StoreEntitySet="Supplier">
  882. <ScalarProperty Name="ID" ColumnName="ID" />
  883. <ScalarProperty Name="Title" ColumnName="Title" />
  884. <ScalarProperty Name="INN" ColumnName="INN" />
  885. <ScalarProperty Name="StartDate" ColumnName="StartDate" />
  886. <ScalarProperty Name="QualityRating" ColumnName="QualityRating" />
  887. <ScalarProperty Name="SupplierType" ColumnName="SupplierType" />
  888. </MappingFragment>
  889. </EntityTypeMapping>
  890. </EntitySetMapping>
  891. <AssociationSetMapping Name="MaterialSupplier" TypeName="user5Model.MaterialSupplier" StoreEntitySet="MaterialSupplier">
  892. <EndProperty Name="Material">
  893. <ScalarProperty Name="ID" ColumnName="MaterialID" />
  894. </EndProperty>
  895. <EndProperty Name="Supplier">
  896. <ScalarProperty Name="ID" ColumnName="SupplierID" />
  897. </EndProperty>
  898. </AssociationSetMapping>
  899. </EntityContainerMapping>
  900. </Mapping>
  901. </edmx:Mappings>
  902. </edmx:Runtime>
  903. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  904. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  905. <Connection>
  906. <DesignerInfoPropertySet>
  907. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  908. </DesignerInfoPropertySet>
  909. </Connection>
  910. <Options>
  911. <DesignerInfoPropertySet>
  912. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  913. <DesignerProperty Name="EnablePluralization" Value="false" />
  914. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  915. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  916. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  917. </DesignerInfoPropertySet>
  918. </Options>
  919. <!-- Diagram content (shape and connector positions) -->
  920. <Diagrams></Diagrams>
  921. </Designer>
  922. </edmx:Edmx>