Model1.edmx 56 KB

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