Model1.edmx 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955
  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="Хранилище mybaseModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
  8. <EntityType Name="Agent">
  9. <Key>
  10. <PropertyRef Name="ID" />
  11. </Key>
  12. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  13. <Property Name="Title" Type="nvarchar" MaxLength="150" Nullable="false" />
  14. <Property Name="AgentTypeID" Type="int" Nullable="false" />
  15. <Property Name="Address" Type="nvarchar" MaxLength="300" />
  16. <Property Name="INN" Type="varchar" MaxLength="12" Nullable="false" />
  17. <Property Name="KPP" Type="varchar" MaxLength="9" />
  18. <Property Name="DirectorName" Type="nvarchar" MaxLength="100" />
  19. <Property Name="Phone" Type="nvarchar" MaxLength="20" Nullable="false" />
  20. <Property Name="Email" Type="nvarchar" MaxLength="255" />
  21. <Property Name="Logo" Type="nvarchar" MaxLength="100" />
  22. <Property Name="Priority" Type="int" Nullable="false" />
  23. </EntityType>
  24. <EntityType Name="AgentPriorityHistory">
  25. <Key>
  26. <PropertyRef Name="ID" />
  27. </Key>
  28. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  29. <Property Name="AgentID" Type="int" Nullable="false" />
  30. <Property Name="ChangeDate" Type="datetime" Nullable="false" />
  31. <Property Name="PriorityValue" Type="int" Nullable="false" />
  32. </EntityType>
  33. <EntityType Name="AgentType">
  34. <Key>
  35. <PropertyRef Name="ID" />
  36. </Key>
  37. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  38. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  39. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  40. </EntityType>
  41. <EntityType Name="Material">
  42. <Key>
  43. <PropertyRef Name="ID" />
  44. </Key>
  45. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  46. <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
  47. <Property Name="CountInPack" Type="int" Nullable="false" />
  48. <Property Name="Unit" Type="nvarchar" MaxLength="10" Nullable="false" />
  49. <Property Name="CountInStock" Type="float" />
  50. <Property Name="MinCount" Type="float" Nullable="false" />
  51. <Property Name="Description" Type="nvarchar(max)" />
  52. <Property Name="Cost" Type="decimal" Precision="10" Scale="2" Nullable="false" />
  53. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  54. <Property Name="MaterialTypeID" Type="int" Nullable="false" />
  55. </EntityType>
  56. <EntityType Name="MaterialCountHistory">
  57. <Key>
  58. <PropertyRef Name="ID" />
  59. </Key>
  60. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  61. <Property Name="MaterialID" Type="int" Nullable="false" />
  62. <Property Name="ChangeDate" Type="datetime" Nullable="false" />
  63. <Property Name="CountValue" Type="float" Nullable="false" />
  64. </EntityType>
  65. <EntityType Name="MaterialSupplier">
  66. <Key>
  67. <PropertyRef Name="MaterialID" />
  68. <PropertyRef Name="SupplierID" />
  69. </Key>
  70. <Property Name="MaterialID" Type="int" Nullable="false" />
  71. <Property Name="SupplierID" Type="int" Nullable="false" />
  72. </EntityType>
  73. <EntityType Name="MaterialType">
  74. <Key>
  75. <PropertyRef Name="ID" />
  76. </Key>
  77. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  78. <Property Name="Title" Type="nvarchar" MaxLength="50" Nullable="false" />
  79. <Property Name="DefectedPercent" Type="float" />
  80. </EntityType>
  81. <EntityType Name="Product">
  82. <Key>
  83. <PropertyRef Name="ID" />
  84. </Key>
  85. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  86. <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
  87. <Property Name="ProductTypeID" Type="int" />
  88. <Property Name="ArticleNumber" Type="nvarchar" MaxLength="10" Nullable="false" />
  89. <Property Name="Description" Type="nvarchar(max)" />
  90. <Property Name="Image" Type="nvarchar" MaxLength="100" />
  91. <Property Name="ProductionPersonCount" Type="int" />
  92. <Property Name="ProductionWorkshopNumber" Type="int" />
  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" Nullable="false" />
  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="Хранилище mybaseModelContainer">
  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="mybaseModel" 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" />
  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" Nullable="false" />
  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. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  587. <ReferentialConstraint>
  588. <Principal Role="Agent">
  589. <PropertyRef Name="ID" />
  590. </Principal>
  591. <Dependent Role="ProductSale">
  592. <PropertyRef Name="AgentID" />
  593. </Dependent>
  594. </ReferentialConstraint>
  595. </Association>
  596. <Association Name="FK_Shop_Agent">
  597. <End Role="Agent" Type="Self.Agent" Multiplicity="1" />
  598. <End Role="Shop" Type="Self.Shop" Multiplicity="*" />
  599. <ReferentialConstraint>
  600. <Principal Role="Agent">
  601. <PropertyRef Name="ID" />
  602. </Principal>
  603. <Dependent Role="Shop">
  604. <PropertyRef Name="AgentID" />
  605. </Dependent>
  606. </ReferentialConstraint>
  607. </Association>
  608. <Association Name="FK_Material_MaterialType">
  609. <End Role="MaterialType" Type="Self.MaterialType" Multiplicity="1" />
  610. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  611. <ReferentialConstraint>
  612. <Principal Role="MaterialType">
  613. <PropertyRef Name="ID" />
  614. </Principal>
  615. <Dependent Role="Material">
  616. <PropertyRef Name="MaterialTypeID" />
  617. </Dependent>
  618. </ReferentialConstraint>
  619. </Association>
  620. <Association Name="FK_MaterialCountHistory_Material">
  621. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  622. <End Role="MaterialCountHistory" Type="Self.MaterialCountHistory" Multiplicity="*" />
  623. <ReferentialConstraint>
  624. <Principal Role="Material">
  625. <PropertyRef Name="ID" />
  626. </Principal>
  627. <Dependent Role="MaterialCountHistory">
  628. <PropertyRef Name="MaterialID" />
  629. </Dependent>
  630. </ReferentialConstraint>
  631. </Association>
  632. <Association Name="FK_ProductMaterial_Material">
  633. <End Role="Material" Type="Self.Material" Multiplicity="1" />
  634. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  635. <ReferentialConstraint>
  636. <Principal Role="Material">
  637. <PropertyRef Name="ID" />
  638. </Principal>
  639. <Dependent Role="ProductMaterial">
  640. <PropertyRef Name="MaterialID" />
  641. </Dependent>
  642. </ReferentialConstraint>
  643. </Association>
  644. <Association Name="FK_Product_ProductType">
  645. <End Role="ProductType" Type="Self.ProductType" Multiplicity="0..1" />
  646. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  647. <ReferentialConstraint>
  648. <Principal Role="ProductType">
  649. <PropertyRef Name="ID" />
  650. </Principal>
  651. <Dependent Role="Product">
  652. <PropertyRef Name="ProductTypeID" />
  653. </Dependent>
  654. </ReferentialConstraint>
  655. </Association>
  656. <Association Name="FK_ProductCostHistory_Product">
  657. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  658. <End Role="ProductCostHistory" Type="Self.ProductCostHistory" Multiplicity="*" />
  659. <ReferentialConstraint>
  660. <Principal Role="Product">
  661. <PropertyRef Name="ID" />
  662. </Principal>
  663. <Dependent Role="ProductCostHistory">
  664. <PropertyRef Name="ProductID" />
  665. </Dependent>
  666. </ReferentialConstraint>
  667. </Association>
  668. <Association Name="FK_ProductMaterial_Product">
  669. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  670. <End Role="ProductMaterial" Type="Self.ProductMaterial" Multiplicity="*" />
  671. <ReferentialConstraint>
  672. <Principal Role="Product">
  673. <PropertyRef Name="ID" />
  674. </Principal>
  675. <Dependent Role="ProductMaterial">
  676. <PropertyRef Name="ProductID" />
  677. </Dependent>
  678. </ReferentialConstraint>
  679. </Association>
  680. <Association Name="FK_ProductSale_Product">
  681. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  682. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  683. <ReferentialConstraint>
  684. <Principal Role="Product">
  685. <PropertyRef Name="ID" />
  686. </Principal>
  687. <Dependent Role="ProductSale">
  688. <PropertyRef Name="ProductID" />
  689. </Dependent>
  690. </ReferentialConstraint>
  691. </Association>
  692. <Association Name="MaterialSupplier">
  693. <End Role="Material" Type="Self.Material" Multiplicity="*" />
  694. <End Role="Supplier" Type="Self.Supplier" Multiplicity="*" />
  695. </Association>
  696. <EntityContainer Name="mybaseEntities" annotation:LazyLoadingEnabled="true">
  697. <EntitySet Name="Agent" EntityType="Self.Agent" />
  698. <EntitySet Name="AgentPriorityHistory" EntityType="Self.AgentPriorityHistory" />
  699. <EntitySet Name="AgentType" EntityType="Self.AgentType" />
  700. <EntitySet Name="Material" EntityType="Self.Material" />
  701. <EntitySet Name="MaterialCountHistory" EntityType="Self.MaterialCountHistory" />
  702. <EntitySet Name="MaterialType" EntityType="Self.MaterialType" />
  703. <EntitySet Name="Product" EntityType="Self.Product" />
  704. <EntitySet Name="ProductCostHistory" EntityType="Self.ProductCostHistory" />
  705. <EntitySet Name="ProductMaterial" EntityType="Self.ProductMaterial" />
  706. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" />
  707. <EntitySet Name="ProductType" EntityType="Self.ProductType" />
  708. <EntitySet Name="Shop" EntityType="Self.Shop" />
  709. <EntitySet Name="Supplier" EntityType="Self.Supplier" />
  710. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
  711. <AssociationSet Name="FK_Agent_AgentType" Association="Self.FK_Agent_AgentType">
  712. <End Role="AgentType" EntitySet="AgentType" />
  713. <End Role="Agent" EntitySet="Agent" />
  714. </AssociationSet>
  715. <AssociationSet Name="FK_AgentPriorityHistory_Agent" Association="Self.FK_AgentPriorityHistory_Agent">
  716. <End Role="Agent" EntitySet="Agent" />
  717. <End Role="AgentPriorityHistory" EntitySet="AgentPriorityHistory" />
  718. </AssociationSet>
  719. <AssociationSet Name="FK_ProductSale_Agent" Association="Self.FK_ProductSale_Agent">
  720. <End Role="Agent" EntitySet="Agent" />
  721. <End Role="ProductSale" EntitySet="ProductSale" />
  722. </AssociationSet>
  723. <AssociationSet Name="FK_Shop_Agent" Association="Self.FK_Shop_Agent">
  724. <End Role="Agent" EntitySet="Agent" />
  725. <End Role="Shop" EntitySet="Shop" />
  726. </AssociationSet>
  727. <AssociationSet Name="FK_Material_MaterialType" Association="Self.FK_Material_MaterialType">
  728. <End Role="MaterialType" EntitySet="MaterialType" />
  729. <End Role="Material" EntitySet="Material" />
  730. </AssociationSet>
  731. <AssociationSet Name="FK_MaterialCountHistory_Material" Association="Self.FK_MaterialCountHistory_Material">
  732. <End Role="Material" EntitySet="Material" />
  733. <End Role="MaterialCountHistory" EntitySet="MaterialCountHistory" />
  734. </AssociationSet>
  735. <AssociationSet Name="FK_ProductMaterial_Material" Association="Self.FK_ProductMaterial_Material">
  736. <End Role="Material" EntitySet="Material" />
  737. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  738. </AssociationSet>
  739. <AssociationSet Name="FK_Product_ProductType" Association="Self.FK_Product_ProductType">
  740. <End Role="ProductType" EntitySet="ProductType" />
  741. <End Role="Product" EntitySet="Product" />
  742. </AssociationSet>
  743. <AssociationSet Name="FK_ProductCostHistory_Product" Association="Self.FK_ProductCostHistory_Product">
  744. <End Role="Product" EntitySet="Product" />
  745. <End Role="ProductCostHistory" EntitySet="ProductCostHistory" />
  746. </AssociationSet>
  747. <AssociationSet Name="FK_ProductMaterial_Product" Association="Self.FK_ProductMaterial_Product">
  748. <End Role="Product" EntitySet="Product" />
  749. <End Role="ProductMaterial" EntitySet="ProductMaterial" />
  750. </AssociationSet>
  751. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  752. <End Role="Product" EntitySet="Product" />
  753. <End Role="ProductSale" EntitySet="ProductSale" />
  754. </AssociationSet>
  755. <AssociationSet Name="MaterialSupplier" Association="Self.MaterialSupplier">
  756. <End Role="Material" EntitySet="Material" />
  757. <End Role="Supplier" EntitySet="Supplier" />
  758. </AssociationSet>
  759. </EntityContainer>
  760. </Schema>
  761. </edmx:ConceptualModels>
  762. <!-- C-S mapping content -->
  763. <edmx:Mappings>
  764. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  765. <EntityContainerMapping StorageEntityContainer="Хранилище mybaseModelContainer" CdmEntityContainer="mybaseEntities">
  766. <EntitySetMapping Name="Agent">
  767. <EntityTypeMapping TypeName="mybaseModel.Agent">
  768. <MappingFragment StoreEntitySet="Agent">
  769. <ScalarProperty Name="ID" ColumnName="ID" />
  770. <ScalarProperty Name="Title" ColumnName="Title" />
  771. <ScalarProperty Name="AgentTypeID" ColumnName="AgentTypeID" />
  772. <ScalarProperty Name="Address" ColumnName="Address" />
  773. <ScalarProperty Name="INN" ColumnName="INN" />
  774. <ScalarProperty Name="KPP" ColumnName="KPP" />
  775. <ScalarProperty Name="DirectorName" ColumnName="DirectorName" />
  776. <ScalarProperty Name="Phone" ColumnName="Phone" />
  777. <ScalarProperty Name="Email" ColumnName="Email" />
  778. <ScalarProperty Name="Logo" ColumnName="Logo" />
  779. <ScalarProperty Name="Priority" ColumnName="Priority" />
  780. </MappingFragment>
  781. </EntityTypeMapping>
  782. </EntitySetMapping>
  783. <EntitySetMapping Name="AgentPriorityHistory">
  784. <EntityTypeMapping TypeName="mybaseModel.AgentPriorityHistory">
  785. <MappingFragment StoreEntitySet="AgentPriorityHistory">
  786. <ScalarProperty Name="ID" ColumnName="ID" />
  787. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  788. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  789. <ScalarProperty Name="PriorityValue" ColumnName="PriorityValue" />
  790. </MappingFragment>
  791. </EntityTypeMapping>
  792. </EntitySetMapping>
  793. <EntitySetMapping Name="AgentType">
  794. <EntityTypeMapping TypeName="mybaseModel.AgentType">
  795. <MappingFragment StoreEntitySet="AgentType">
  796. <ScalarProperty Name="ID" ColumnName="ID" />
  797. <ScalarProperty Name="Title" ColumnName="Title" />
  798. <ScalarProperty Name="Image" ColumnName="Image" />
  799. </MappingFragment>
  800. </EntityTypeMapping>
  801. </EntitySetMapping>
  802. <EntitySetMapping Name="Material">
  803. <EntityTypeMapping TypeName="mybaseModel.Material">
  804. <MappingFragment StoreEntitySet="Material">
  805. <ScalarProperty Name="ID" ColumnName="ID" />
  806. <ScalarProperty Name="Title" ColumnName="Title" />
  807. <ScalarProperty Name="CountInPack" ColumnName="CountInPack" />
  808. <ScalarProperty Name="Unit" ColumnName="Unit" />
  809. <ScalarProperty Name="CountInStock" ColumnName="CountInStock" />
  810. <ScalarProperty Name="MinCount" ColumnName="MinCount" />
  811. <ScalarProperty Name="Description" ColumnName="Description" />
  812. <ScalarProperty Name="Cost" ColumnName="Cost" />
  813. <ScalarProperty Name="Image" ColumnName="Image" />
  814. <ScalarProperty Name="MaterialTypeID" ColumnName="MaterialTypeID" />
  815. </MappingFragment>
  816. </EntityTypeMapping>
  817. </EntitySetMapping>
  818. <EntitySetMapping Name="MaterialCountHistory">
  819. <EntityTypeMapping TypeName="mybaseModel.MaterialCountHistory">
  820. <MappingFragment StoreEntitySet="MaterialCountHistory">
  821. <ScalarProperty Name="ID" ColumnName="ID" />
  822. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  823. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  824. <ScalarProperty Name="CountValue" ColumnName="CountValue" />
  825. </MappingFragment>
  826. </EntityTypeMapping>
  827. </EntitySetMapping>
  828. <EntitySetMapping Name="MaterialType">
  829. <EntityTypeMapping TypeName="mybaseModel.MaterialType">
  830. <MappingFragment StoreEntitySet="MaterialType">
  831. <ScalarProperty Name="ID" ColumnName="ID" />
  832. <ScalarProperty Name="Title" ColumnName="Title" />
  833. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  834. </MappingFragment>
  835. </EntityTypeMapping>
  836. </EntitySetMapping>
  837. <EntitySetMapping Name="Product">
  838. <EntityTypeMapping TypeName="mybaseModel.Product">
  839. <MappingFragment StoreEntitySet="Product">
  840. <ScalarProperty Name="ID" ColumnName="ID" />
  841. <ScalarProperty Name="Title" ColumnName="Title" />
  842. <ScalarProperty Name="ProductTypeID" ColumnName="ProductTypeID" />
  843. <ScalarProperty Name="ArticleNumber" ColumnName="ArticleNumber" />
  844. <ScalarProperty Name="Description" ColumnName="Description" />
  845. <ScalarProperty Name="Image" ColumnName="Image" />
  846. <ScalarProperty Name="ProductionPersonCount" ColumnName="ProductionPersonCount" />
  847. <ScalarProperty Name="ProductionWorkshopNumber" ColumnName="ProductionWorkshopNumber" />
  848. <ScalarProperty Name="MinCostForAgent" ColumnName="MinCostForAgent" />
  849. </MappingFragment>
  850. </EntityTypeMapping>
  851. </EntitySetMapping>
  852. <EntitySetMapping Name="ProductCostHistory">
  853. <EntityTypeMapping TypeName="mybaseModel.ProductCostHistory">
  854. <MappingFragment StoreEntitySet="ProductCostHistory">
  855. <ScalarProperty Name="ID" ColumnName="ID" />
  856. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  857. <ScalarProperty Name="ChangeDate" ColumnName="ChangeDate" />
  858. <ScalarProperty Name="CostValue" ColumnName="CostValue" />
  859. </MappingFragment>
  860. </EntityTypeMapping>
  861. </EntitySetMapping>
  862. <EntitySetMapping Name="ProductMaterial">
  863. <EntityTypeMapping TypeName="mybaseModel.ProductMaterial">
  864. <MappingFragment StoreEntitySet="ProductMaterial">
  865. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  866. <ScalarProperty Name="MaterialID" ColumnName="MaterialID" />
  867. <ScalarProperty Name="Count" ColumnName="Count" />
  868. </MappingFragment>
  869. </EntityTypeMapping>
  870. </EntitySetMapping>
  871. <EntitySetMapping Name="ProductSale">
  872. <EntityTypeMapping TypeName="mybaseModel.ProductSale">
  873. <MappingFragment StoreEntitySet="ProductSale">
  874. <ScalarProperty Name="ID" ColumnName="ID" />
  875. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  876. <ScalarProperty Name="ProductID" ColumnName="ProductID" />
  877. <ScalarProperty Name="SaleDate" ColumnName="SaleDate" />
  878. <ScalarProperty Name="ProductCount" ColumnName="ProductCount" />
  879. </MappingFragment>
  880. </EntityTypeMapping>
  881. </EntitySetMapping>
  882. <EntitySetMapping Name="ProductType">
  883. <EntityTypeMapping TypeName="mybaseModel.ProductType">
  884. <MappingFragment StoreEntitySet="ProductType">
  885. <ScalarProperty Name="ID" ColumnName="ID" />
  886. <ScalarProperty Name="Title" ColumnName="Title" />
  887. <ScalarProperty Name="DefectedPercent" ColumnName="DefectedPercent" />
  888. </MappingFragment>
  889. </EntityTypeMapping>
  890. </EntitySetMapping>
  891. <EntitySetMapping Name="Shop">
  892. <EntityTypeMapping TypeName="mybaseModel.Shop">
  893. <MappingFragment StoreEntitySet="Shop">
  894. <ScalarProperty Name="ID" ColumnName="ID" />
  895. <ScalarProperty Name="Title" ColumnName="Title" />
  896. <ScalarProperty Name="Address" ColumnName="Address" />
  897. <ScalarProperty Name="AgentID" ColumnName="AgentID" />
  898. </MappingFragment>
  899. </EntityTypeMapping>
  900. </EntitySetMapping>
  901. <EntitySetMapping Name="Supplier">
  902. <EntityTypeMapping TypeName="mybaseModel.Supplier">
  903. <MappingFragment StoreEntitySet="Supplier">
  904. <ScalarProperty Name="ID" ColumnName="ID" />
  905. <ScalarProperty Name="Title" ColumnName="Title" />
  906. <ScalarProperty Name="INN" ColumnName="INN" />
  907. <ScalarProperty Name="StartDate" ColumnName="StartDate" />
  908. <ScalarProperty Name="QualityRating" ColumnName="QualityRating" />
  909. <ScalarProperty Name="SupplierType" ColumnName="SupplierType" />
  910. </MappingFragment>
  911. </EntityTypeMapping>
  912. </EntitySetMapping>
  913. <EntitySetMapping Name="sysdiagrams">
  914. <EntityTypeMapping TypeName="mybaseModel.sysdiagrams">
  915. <MappingFragment StoreEntitySet="sysdiagrams">
  916. <ScalarProperty Name="name" ColumnName="name" />
  917. <ScalarProperty Name="principal_id" ColumnName="principal_id" />
  918. <ScalarProperty Name="diagram_id" ColumnName="diagram_id" />
  919. <ScalarProperty Name="version" ColumnName="version" />
  920. <ScalarProperty Name="definition" ColumnName="definition" />
  921. </MappingFragment>
  922. </EntityTypeMapping>
  923. </EntitySetMapping>
  924. <AssociationSetMapping Name="MaterialSupplier" TypeName="mybaseModel.MaterialSupplier" StoreEntitySet="MaterialSupplier">
  925. <EndProperty Name="Material">
  926. <ScalarProperty Name="ID" ColumnName="MaterialID" />
  927. </EndProperty>
  928. <EndProperty Name="Supplier">
  929. <ScalarProperty Name="ID" ColumnName="SupplierID" />
  930. </EndProperty>
  931. </AssociationSetMapping>
  932. </EntityContainerMapping>
  933. </Mapping>
  934. </edmx:Mappings>
  935. </edmx:Runtime>
  936. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  937. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  938. <Connection>
  939. <DesignerInfoPropertySet>
  940. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  941. </DesignerInfoPropertySet>
  942. </Connection>
  943. <Options>
  944. <DesignerInfoPropertySet>
  945. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  946. <DesignerProperty Name="EnablePluralization" Value="false" />
  947. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  948. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  949. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  950. </DesignerInfoPropertySet>
  951. </Options>
  952. <!-- Diagram content (shape and connector positions) -->
  953. <Diagrams></Diagrams>
  954. </Designer>
  955. </edmx:Edmx>