Model1.edmx 53 KB

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