Model1.edmx 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  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="Хранилище user38Model" 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="Хранилище user38ModelContainer">
  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>
  387. </edmx:StorageModels>
  388. <!-- CSDL content -->
  389. <edmx:ConceptualModels>
  390. <Schema Namespace="user38Model" 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">
  391. <EntityType Name="Agent">
  392. <Key>
  393. <PropertyRef Name="ID" />
  394. </Key>
  395. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  396. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  397. <Property Name="AgentTypeID" Type="Int32" Nullable="false" />
  398. <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
  399. <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
  400. <Property Name="KPP" Type="String" MaxLength="9" FixedLength="false" Unicode="false" />
  401. <Property Name="DirectorName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  402. <Property Name="Phone" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  403. <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
  404. <Property Name="Logo" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  405. <Property Name="Priority" Type="Int32" Nullable="false" />
  406. <NavigationProperty Name="AgentType" Relationship="Self.FK_Agent_AgentType" FromRole="Agent" ToRole="AgentType" />
  407. <NavigationProperty Name="AgentPriorityHistory" Relationship="Self.FK_AgentPriorityHistory_Agent" FromRole="Agent" ToRole="AgentPriorityHistory" />
  408. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Agent" FromRole="Agent" ToRole="ProductSale" />
  409. <NavigationProperty Name="Shop" Relationship="Self.FK_Shop_Agent" FromRole="Agent" ToRole="Shop" />
  410. </EntityType>
  411. <EntityType Name="AgentPriorityHistory">
  412. <Key>
  413. <PropertyRef Name="ID" />
  414. </Key>
  415. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  416. <Property Name="AgentID" Type="Int32" Nullable="false" />
  417. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  418. <Property Name="PriorityValue" Type="Int32" Nullable="false" />
  419. <NavigationProperty Name="Agent" Relationship="Self.FK_AgentPriorityHistory_Agent" FromRole="AgentPriorityHistory" ToRole="Agent" />
  420. </EntityType>
  421. <EntityType Name="AgentType">
  422. <Key>
  423. <PropertyRef Name="ID" />
  424. </Key>
  425. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  426. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  427. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  428. <NavigationProperty Name="Agent" Relationship="Self.FK_Agent_AgentType" FromRole="AgentType" ToRole="Agent" />
  429. </EntityType>
  430. <EntityType Name="Material">
  431. <Key>
  432. <PropertyRef Name="ID" />
  433. </Key>
  434. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  435. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  436. <Property Name="CountInPack" Type="Int32" Nullable="false" />
  437. <Property Name="Unit" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
  438. <Property Name="CountInStock" Type="Double" />
  439. <Property Name="MinCount" Type="Double" Nullable="false" />
  440. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  441. <Property Name="Cost" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  442. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  443. <Property Name="MaterialTypeID" Type="Int32" Nullable="false" />
  444. <NavigationProperty Name="MaterialType" Relationship="Self.FK_Material_MaterialType" FromRole="Material" ToRole="MaterialType" />
  445. <NavigationProperty Name="MaterialCountHistory" Relationship="Self.FK_MaterialCountHistory_Material" FromRole="Material" ToRole="MaterialCountHistory" />
  446. <NavigationProperty Name="ProductMaterial" Relationship="Self.FK_ProductMaterial_Material" FromRole="Material" ToRole="ProductMaterial" />
  447. <NavigationProperty Name="Supplier" Relationship="Self.MaterialSupplier" FromRole="Material" ToRole="Supplier" />
  448. </EntityType>
  449. <EntityType Name="MaterialCountHistory">
  450. <Key>
  451. <PropertyRef Name="ID" />
  452. </Key>
  453. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  454. <Property Name="MaterialID" Type="Int32" Nullable="false" />
  455. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  456. <Property Name="CountValue" Type="Double" Nullable="false" />
  457. <NavigationProperty Name="Material" Relationship="Self.FK_MaterialCountHistory_Material" FromRole="MaterialCountHistory" ToRole="Material" />
  458. </EntityType>
  459. <EntityType Name="MaterialType">
  460. <Key>
  461. <PropertyRef Name="ID" />
  462. </Key>
  463. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  464. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  465. <Property Name="DefectedPercent" Type="Double" Nullable="false" />
  466. <NavigationProperty Name="Material" Relationship="Self.FK_Material_MaterialType" FromRole="MaterialType" ToRole="Material" />
  467. </EntityType>
  468. <EntityType Name="Product">
  469. <Key>
  470. <PropertyRef Name="ID" />
  471. </Key>
  472. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  473. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  474. <Property Name="ProductTypeID" Type="Int32" />
  475. <Property Name="ArticleNumber" Type="String" MaxLength="10" FixedLength="false" Unicode="true" Nullable="false" />
  476. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  477. <Property Name="Image" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  478. <Property Name="ProductionPersonCount" Type="Int32" />
  479. <Property Name="ProductionWorkshopNumber" Type="Int32" />
  480. <Property Name="MinCostForAgent" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  481. <NavigationProperty Name="ProductType" Relationship="Self.FK_Product_ProductType" FromRole="Product" ToRole="ProductType" />
  482. <NavigationProperty Name="ProductCostHistory" Relationship="Self.FK_ProductCostHistory_Product" FromRole="Product" ToRole="ProductCostHistory" />
  483. <NavigationProperty Name="ProductMaterial" Relationship="Self.FK_ProductMaterial_Product" FromRole="Product" ToRole="ProductMaterial" />
  484. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Product" FromRole="Product" ToRole="ProductSale" />
  485. </EntityType>
  486. <EntityType Name="ProductCostHistory">
  487. <Key>
  488. <PropertyRef Name="ID" />
  489. </Key>
  490. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  491. <Property Name="ProductID" Type="Int32" Nullable="false" />
  492. <Property Name="ChangeDate" Type="DateTime" Nullable="false" Precision="3" />
  493. <Property Name="CostValue" Type="Decimal" Precision="10" Scale="2" Nullable="false" />
  494. <NavigationProperty Name="Product" Relationship="Self.FK_ProductCostHistory_Product" FromRole="ProductCostHistory" ToRole="Product" />
  495. </EntityType>
  496. <EntityType Name="ProductMaterial">
  497. <Key>
  498. <PropertyRef Name="ProductID" />
  499. <PropertyRef Name="MaterialID" />
  500. </Key>
  501. <Property Name="ProductID" Type="Int32" Nullable="false" />
  502. <Property Name="MaterialID" Type="Int32" Nullable="false" />
  503. <Property Name="Count" Type="Double" />
  504. <NavigationProperty Name="Material" Relationship="Self.FK_ProductMaterial_Material" FromRole="ProductMaterial" ToRole="Material" />
  505. <NavigationProperty Name="Product" Relationship="Self.FK_ProductMaterial_Product" FromRole="ProductMaterial" ToRole="Product" />
  506. </EntityType>
  507. <EntityType Name="ProductSale">
  508. <Key>
  509. <PropertyRef Name="ID" />
  510. </Key>
  511. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  512. <Property Name="AgentID" Type="Int32" Nullable="false" />
  513. <Property Name="ProductID" Type="Int32" Nullable="false" />
  514. <Property Name="SaleDate" Type="DateTime" Nullable="false" Precision="0" />
  515. <Property Name="ProductCount" Type="Int32" Nullable="false" />
  516. <NavigationProperty Name="Agent" Relationship="Self.FK_ProductSale_Agent" FromRole="ProductSale" ToRole="Agent" />
  517. <NavigationProperty Name="Product" Relationship="Self.FK_ProductSale_Product" FromRole="ProductSale" ToRole="Product" />
  518. </EntityType>
  519. <EntityType Name="ProductType">
  520. <Key>
  521. <PropertyRef Name="ID" />
  522. </Key>
  523. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  524. <Property Name="Title" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  525. <Property Name="DefectedPercent" Type="Double" />
  526. <NavigationProperty Name="Product" Relationship="Self.FK_Product_ProductType" FromRole="ProductType" ToRole="Product" />
  527. </EntityType>
  528. <EntityType Name="Shop">
  529. <Key>
  530. <PropertyRef Name="ID" />
  531. </Key>
  532. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  533. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  534. <Property Name="Address" Type="String" MaxLength="300" FixedLength="false" Unicode="true" />
  535. <Property Name="AgentID" Type="Int32" Nullable="false" />
  536. <NavigationProperty Name="Agent" Relationship="Self.FK_Shop_Agent" FromRole="Shop" ToRole="Agent" />
  537. </EntityType>
  538. <EntityType Name="Supplier">
  539. <Key>
  540. <PropertyRef Name="ID" />
  541. </Key>
  542. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  543. <Property Name="Title" Type="String" MaxLength="150" FixedLength="false" Unicode="true" Nullable="false" />
  544. <Property Name="INN" Type="String" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
  545. <Property Name="StartDate" Type="DateTime" Nullable="false" Precision="0" />
  546. <Property Name="QualityRating" Type="Int32" />
  547. <Property Name="SupplierType" Type="String" MaxLength="20" FixedLength="false" Unicode="true" />
  548. <NavigationProperty Name="Material" Relationship="Self.MaterialSupplier" FromRole="Supplier" ToRole="Material" />
  549. </EntityType>
  550. <EntityType Name="sysdiagrams">
  551. <Key>
  552. <PropertyRef Name="diagram_id" />
  553. </Key>
  554. <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
  555. <Property Name="principal_id" Type="Int32" Nullable="false" />
  556. <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  557. <Property Name="version" Type="Int32" />
  558. <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
  559. </EntityType>
  560. <Association Name="FK_Agent_AgentType">
  561. <End Role="AgentType" Type="Self.AgentType" Multiplicity="1" />
  562. <End Role="Agent" Type="Self.Agent" Multiplicity="*" />
  563. <ReferentialConstraint>
  564. <Principal Role="AgentType">
  565. <PropertyRef Name="ID" />
  566. </Principal>
  567. <Dependent Role="Agent">
  568. <PropertyRef Name="AgentTypeID" />
  569. </Dependent>
  570. </ReferentialConstraint>
  571. </Association>
  572. <Association Name="FK_AgentPriorityHistory_Agent">
  573. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  574. <End Role="AgentPriorityHistory" Type="Self.AgentPriorityHistory" Multiplicity="*" />
  575. <ReferentialConstraint>
  576. <Principal Role="Agent">
  577. <PropertyRef Name="ID" />
  578. </Principal>
  579. <Dependent Role="AgentPriorityHistory">
  580. <PropertyRef Name="AgentID" />
  581. </Dependent>
  582. </ReferentialConstraint>
  583. </Association>
  584. <Association Name="FK_ProductSale_Agent">
  585. <End Role="Agent" Type="Self.Agent" Multiplicity="1" >
  586. <OnDelete Action="Cascade" />
  587. </End>
  588. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  589. <ReferentialConstraint>
  590. <Principal Role="Agent">
  591. <PropertyRef Name="ID" />
  592. </Principal>
  593. <Dependent Role="ProductSale">
  594. <PropertyRef Name="AgentID" />
  595. </Dependent>
  596. </ReferentialConstraint>
  597. </Association>
  598. <Association Name="FK_Shop_Agent">
  599. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  600. <End Role="Shop" Type="Self.Shop" Multiplicity="*" />
  601. <ReferentialConstraint>
  602. <Principal Role="Agent">
  603. <PropertyRef Name="ID" />
  604. </Principal>
  605. <Dependent Role="Shop">
  606. <PropertyRef Name="AgentID" />
  607. </Dependent>
  608. </ReferentialConstraint>
  609. </Association>
  610. <Association Name="FK_Material_MaterialType">
  611. <End Role="MaterialType" Type="Self.MaterialType" Multiplicity="1" />
  612. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  613. <ReferentialConstraint>
  614. <Principal Role="MaterialType">
  615. <PropertyRef Name="ID" />
  616. </Principal>
  617. <Dependent Role="Material">
  618. <PropertyRef Name="MaterialTypeID" />
  619. </Dependent>
  620. </ReferentialConstraint>
  621. </Association>
  622. <Association Name="FK_MaterialCountHistory_Material">
  623. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  624. <End Role="MaterialCountHistory" Type="Self.MaterialCountHistory" Multiplicity="*" />
  625. <ReferentialConstraint>
  626. <Principal Role="Material">
  627. <PropertyRef Name="ID" />
  628. </Principal>
  629. <Dependent Role="MaterialCountHistory">
  630. <PropertyRef Name="MaterialID" />
  631. </Dependent>
  632. </ReferentialConstraint>
  633. </Association>
  634. <Association Name="FK_ProductMaterial_Material">
  635. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  636. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  637. <ReferentialConstraint>
  638. <Principal Role="Material">
  639. <PropertyRef Name="ID" />
  640. </Principal>
  641. <Dependent Role="ProductMaterial">
  642. <PropertyRef Name="MaterialID" />
  643. </Dependent>
  644. </ReferentialConstraint>
  645. </Association>
  646. <Association Name="FK_Product_ProductType">
  647. <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
  648. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  649. <ReferentialConstraint>
  650. <Principal Role="ProductType">
  651. <PropertyRef Name="ID" />
  652. </Principal>
  653. <Dependent Role="Product">
  654. <PropertyRef Name="ProductTypeID" />
  655. </Dependent>
  656. </ReferentialConstraint>
  657. </Association>
  658. <Association Name="FK_ProductCostHistory_Product">
  659. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  660. <End Role="ProductCostHistory" Type="Self.ProductCostHistory" Multiplicity="*" />
  661. <ReferentialConstraint>
  662. <Principal Role="Product">
  663. <PropertyRef Name="ID" />
  664. </Principal>
  665. <Dependent Role="ProductCostHistory">
  666. <PropertyRef Name="ProductID" />
  667. </Dependent>
  668. </ReferentialConstraint>
  669. </Association>
  670. <Association Name="FK_ProductMaterial_Product">
  671. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  672. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  673. <ReferentialConstraint>
  674. <Principal Role="Product">
  675. <PropertyRef Name="ID" />
  676. </Principal>
  677. <Dependent Role="ProductMaterial">
  678. <PropertyRef Name="ProductID" />
  679. </Dependent>
  680. </ReferentialConstraint>
  681. </Association>
  682. <Association Name="FK_ProductSale_Product">
  683. <End Role="Product" Type="Self.Product" Multiplicity="1" >
  684. <OnDelete Action="Cascade" />
  685. </End>
  686. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  687. <ReferentialConstraint>
  688. <Principal Role="Product">
  689. <PropertyRef Name="ID" />
  690. </Principal>
  691. <Dependent Role="ProductSale">
  692. <PropertyRef Name="ProductID" />
  693. </Dependent>
  694. </ReferentialConstraint>
  695. </Association>
  696. <Association Name="MaterialSupplier">
  697. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  698. <End Role="Supplier" Type="Self.Supplier" Multiplicity="*" />
  699. </Association>
  700. <EntityContainer Name="user38Entities" annotation:LazyLoadingEnabled="true">
  701. <EntitySet Name="Agent" EntityType="Self.Agent" />
  702. <EntitySet Name="AgentPriorityHistory" EntityType="Self.AgentPriorityHistory" />
  703. <EntitySet Name="AgentType" EntityType="Self.AgentType" />
  704. <EntitySet Name="Material" EntityType="Self.Material" />
  705. <EntitySet Name="MaterialCountHistory" EntityType="Self.MaterialCountHistory" />
  706. <EntitySet Name="MaterialType" EntityType="Self.MaterialType" />
  707. <EntitySet Name="Product" EntityType="Self.Product" />
  708. <EntitySet Name="ProductCostHistory" EntityType="Self.ProductCostHistory" />
  709. <EntitySet Name="ProductMaterial" EntityType="Self.ProductMaterial" />
  710. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" />
  711. <EntitySet Name="ProductType" EntityType="Self.ProductType" />
  712. <EntitySet Name="Shop" EntityType="Self.Shop" />
  713. <EntitySet Name="Supplier" EntityType="Self.Supplier" />
  714. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
  715. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  716. <End Role="AgentType" EntitySet="AgentType" />
  717. <End Role="Agent" EntitySet="Agent" />
  718. </AssociationSet>
  719. <AssociationSet Name="FK_AgentPriorityHistory_Agent" Association="Self.FK_AgentPriorityHistory_Agent">
  720. <End Role="Agent" EntitySet="Agent" />
  721. <End Role="AgentPriorityHistory" EntitySet="AgentPriorityHistory" />
  722. </AssociationSet>
  723. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  724. <End Role="Agent" EntitySet="Agent" />
  725. <End Role="ProductSale" EntitySet="ProductSale" />
  726. </AssociationSet>
  727. <AssociationSet Name="FK_Shop_Agent" Association="Self.FK_Shop_Agent">
  728. <End Role="Agent" EntitySet="Agent" />
  729. <End Role="Shop" EntitySet="Shop" />
  730. </AssociationSet>
  731. <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
  732. <End Role="MaterialType" EntitySet="MaterialType" />
  733. <End Role="Material" EntitySet="Material" />
  734. </AssociationSet>
  735. <AssociationSet Name="FK_MaterialCountHistory_Material" Association="Self.FK_MaterialCountHistory_Material">
  736. <End Role="Material" EntitySet="Material" />
  737. <End Role="MaterialCountHistory" EntitySet="MaterialCountHistory" />
  738. </AssociationSet>
  739. <AssociationSet Name="FK_ProductMaterial_Material" Association="Self.FK_ProductMaterial_Material">
  740. <End Role="Material" EntitySet="Material" />
  741. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  742. </AssociationSet>
  743. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  744. <End Role="ProductType" EntitySet="ProductType" />
  745. <End Role="Product" EntitySet="Product" />
  746. </AssociationSet>
  747. <AssociationSet Name="FK_ProductCostHistory_Product" Association="Self.FK_ProductCostHistory_Product">
  748. <End Role="Product" EntitySet="Product" />
  749. <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
  750. </AssociationSet>
  751. <AssociationSet Name="FK_ProductMaterial_Product" Association="Self.FK_ProductMaterial_Product">
  752. <End Role="Product" EntitySet="Product" />
  753. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  754. </AssociationSet>
  755. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  756. <End Role="Product" EntitySet="Product" />
  757. <End Role="ProductSale" EntitySet="ProductSale" />
  758. </AssociationSet>
  759. <AssociationSet Name="MaterialSupplier" Association="Self.MaterialSupplier">
  760. <End Role="Material" EntitySet="Material" />
  761. <End Role="Supplier" EntitySet="Supplier" />
  762. </AssociationSet>
  763. </EntityContainer>
  764. </Schema>
  765. </edmx:ConceptualModels>
  766. <!-- C-S mapping content -->
  767. <edmx:Mappings>
  768. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  769. <EntityContainerMapping StorageEntityContainer="Хранилище user38ModelContainer" CdmEntityContainer="user38Entities">
  770. <EntitySetMapping Name="Agent">
  771. <EntityTypeMapping TypeName="user38Model.Agent">
  772. <MappingFragment StoreEntitySet="Agent">
  773. <ScalarProperty Name="ID" ColumnName="ID" />
  774. <ScalarProperty Name="Title" ColumnName="Title" />
  775. <ScalarProperty Name="AgentTypeID" ColumnName="AgentTypeID" />
  776. <ScalarProperty Name="Address" ColumnName="Address" />
  777. <ScalarProperty Name="INN" ColumnName="INN" />
  778. <ScalarProperty Name="KPP" ColumnName="KPP" />
  779. <ScalarProperty Name="DirectorName" ColumnName="DirectorName" />
  780. <ScalarProperty Name="Phone" ColumnName="Phone" />
  781. <ScalarProperty Name="Email" ColumnName="Email" />
  782. <ScalarProperty Name="Logo" ColumnName="Logo" />
  783. <ScalarProperty Name="Priority" ColumnName="Priority" />
  784. </MappingFragment>
  785. </EntityTypeMapping>
  786. </EntitySetMapping>
  787. <EntitySetMapping Name="AgentPriorityHistory">
  788. <EntityTypeMapping TypeName="user38Model.AgentPriorityHistory">
  789. <MappingFragment StoreEntitySet="AgentPriorityHistory">
  790. <ScalarProperty Name="ID" ColumnName="ID" />
  791. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  792. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  793. <ScalarProperty Name="PriorityValue" ColumnName="PriorityValue" />
  794. </MappingFragment>
  795. </EntityTypeMapping>
  796. </EntitySetMapping>
  797. <EntitySetMapping Name="AgentType">
  798. <EntityTypeMapping TypeName="user38Model.AgentType">
  799. <MappingFragment StoreEntitySet="AgentType">
  800. <ScalarProperty Name="ID" ColumnName="ID" />
  801. <ScalarProperty Name="Title" ColumnName="Title" />
  802. <ScalarProperty Name="Image" ColumnName="Image" />
  803. </MappingFragment>
  804. </EntityTypeMapping>
  805. </EntitySetMapping>
  806. <EntitySetMapping Name="Material">
  807. <EntityTypeMapping TypeName="user38Model.Material">
  808. <MappingFragment StoreEntitySet="Material">
  809. <ScalarProperty Name="ID" ColumnName="ID" />
  810. <ScalarProperty Name="Title" ColumnName="Title" />
  811. <ScalarProperty Name="CountInPack" ColumnName="CountInPack" />
  812. <ScalarProperty Name="Unit" ColumnName="Unit" />
  813. <ScalarProperty Name="CountInStock" ColumnName="CountInStock" />
  814. <ScalarProperty Name="MinCount" ColumnName="MinCount" />
  815. <ScalarProperty Name="Description" ColumnName="Description" />
  816. <ScalarProperty Name="Cost" ColumnName="Cost" />
  817. <ScalarProperty Name="Image" ColumnName="Image" />
  818. <ScalarProperty Name="MaterialTypeID" ColumnName="MaterialTypeID" />
  819. </MappingFragment>
  820. </EntityTypeMapping>
  821. </EntitySetMapping>
  822. <EntitySetMapping Name="MaterialCountHistory">
  823. <EntityTypeMapping TypeName="user38Model.MaterialCountHistory">
  824. <MappingFragment StoreEntitySet="MaterialCountHistory">
  825. <ScalarProperty Name="ID" ColumnName="ID" />
  826. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  827. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  828. <ScalarProperty Name="CountValue" ColumnName="CountValue" />
  829. </MappingFragment>
  830. </EntityTypeMapping>
  831. </EntitySetMapping>
  832. <EntitySetMapping Name="MaterialType">
  833. <EntityTypeMapping TypeName="user38Model.MaterialType">
  834. <MappingFragment StoreEntitySet="MaterialType">
  835. <ScalarProperty Name="ID" ColumnName="ID" />
  836. <ScalarProperty Name="Title" ColumnName="Title" />
  837. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  838. </MappingFragment>
  839. </EntityTypeMapping>
  840. </EntitySetMapping>
  841. <EntitySetMapping Name="Product">
  842. <EntityTypeMapping TypeName="user38Model.Product">
  843. <MappingFragment StoreEntitySet="Product">
  844. <ScalarProperty Name="ID" ColumnName="ID" />
  845. <ScalarProperty Name="Title" ColumnName="Title" />
  846. <ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
  847. <ScalarProperty Name="ArticleNumber" ColumnName="ArticleNumber" />
  848. <ScalarProperty Name="Description" ColumnName="Description" />
  849. <ScalarProperty Name="Image" ColumnName="Image" />
  850. <ScalarProperty Name="ProductionPersonCount" ColumnName="ProductionPersonCount" />
  851. <ScalarProperty Name="ProductionWorkshopNumber" ColumnName="ProductionWorkshopNumber" />
  852. <ScalarProperty Name="MinCostForAgent" ColumnName="MinCostForAgent" />
  853. </MappingFragment>
  854. </EntityTypeMapping>
  855. </EntitySetMapping>
  856. <EntitySetMapping Name="ProductCostHistory">
  857. <EntityTypeMapping TypeName="user38Model.ProductCostHistory">
  858. <MappingFragment StoreEntitySet="ProductCostHistory">
  859. <ScalarProperty Name="ID" ColumnName="ID" />
  860. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  861. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  862. <ScalarProperty Name="CostValue" ColumnName="CostValue" />
  863. </MappingFragment>
  864. </EntityTypeMapping>
  865. </EntitySetMapping>
  866. <EntitySetMapping Name="ProductMaterial">
  867. <EntityTypeMapping TypeName="user38Model.ProductMaterial">
  868. <MappingFragment StoreEntitySet="ProductMaterial">
  869. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  870. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  871. <ScalarProperty Name="Count" ColumnName="Count" />
  872. </MappingFragment>
  873. </EntityTypeMapping>
  874. </EntitySetMapping>
  875. <EntitySetMapping Name="ProductSale">
  876. <EntityTypeMapping TypeName="user38Model.ProductSale">
  877. <MappingFragment StoreEntitySet="ProductSale">
  878. <ScalarProperty Name="ID" ColumnName="ID" />
  879. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  880. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  881. <ScalarProperty Name="SaleDate" ColumnName="SaleDate" />
  882. <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
  883. </MappingFragment>
  884. </EntityTypeMapping>
  885. </EntitySetMapping>
  886. <EntitySetMapping Name="ProductType">
  887. <EntityTypeMapping TypeName="user38Model.ProductType">
  888. <MappingFragment StoreEntitySet="ProductType">
  889. <ScalarProperty Name="ID" ColumnName="ID" />
  890. <ScalarProperty Name="Title" ColumnName="Title" />
  891. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  892. </MappingFragment>
  893. </EntityTypeMapping>
  894. </EntitySetMapping>
  895. <EntitySetMapping Name="Shop">
  896. <EntityTypeMapping TypeName="user38Model.Shop">
  897. <MappingFragment StoreEntitySet="Shop">
  898. <ScalarProperty Name="ID" ColumnName="ID" />
  899. <ScalarProperty Name="Title" ColumnName="Title" />
  900. <ScalarProperty Name="Address" ColumnName="Address" />
  901. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  902. </MappingFragment>
  903. </EntityTypeMapping>
  904. </EntitySetMapping>
  905. <EntitySetMapping Name="Supplier">
  906. <EntityTypeMapping TypeName="user38Model.Supplier">
  907. <MappingFragment StoreEntitySet="Supplier">
  908. <ScalarProperty Name="ID" ColumnName="ID" />
  909. <ScalarProperty Name="Title" ColumnName="Title" />
  910. <ScalarProperty Name="INN" ColumnName="INN" />
  911. <ScalarProperty Name="StartDate" ColumnName="StartDate" />
  912. <ScalarProperty Name="QualityRating" ColumnName="QualityRating" />
  913. <ScalarProperty Name="SupplierType" ColumnName="SupplierType" />
  914. </MappingFragment>
  915. </EntityTypeMapping>
  916. </EntitySetMapping>
  917. <EntitySetMapping Name="sysdiagrams">
  918. <EntityTypeMapping TypeName="user38Model.sysdiagrams">
  919. <MappingFragment StoreEntitySet="sysdiagrams">
  920. <ScalarProperty Name="name" ColumnName="name" />
  921. <ScalarProperty Name="principal_id" ColumnName="principal_id" />
  922. <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
  923. <ScalarProperty Name="version" ColumnName="version" />
  924. <ScalarProperty Name="definition" ColumnName="definition" />
  925. </MappingFragment>
  926. </EntityTypeMapping>
  927. </EntitySetMapping>
  928. <AssociationSetMapping Name="MaterialSupplier" TypeName="user38Model.MaterialSupplier" StoreEntitySet="MaterialSupplier">
  929. <EndProperty Name="Material">
  930. <ScalarProperty Name="ID" ColumnName="MaterialID" />
  931. </EndProperty>
  932. <EndProperty Name="Supplier">
  933. <ScalarProperty Name="ID" ColumnName="SupplierID" />
  934. </EndProperty>
  935. </AssociationSetMapping>
  936. </EntityContainerMapping>
  937. </Mapping>
  938. </edmx:Mappings>
  939. </edmx:Runtime>
  940. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  941. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  942. <Connection>
  943. <DesignerInfoPropertySet>
  944. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  945. </DesignerInfoPropertySet>
  946. </Connection>
  947. <Options>
  948. <DesignerInfoPropertySet>
  949. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  950. <DesignerProperty Name="EnablePluralization" Value="false" />
  951. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  952. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  953. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  954. </DesignerInfoPropertySet>
  955. </Options>
  956. <!-- Diagram content (shape and connector positions) -->
  957. <Diagrams></Diagrams>
  958. </Designer>
  959. </edmx:Edmx>