BaseModel.edmx 53 KB

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