Model1.edmx 55 KB

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