DataBase.edmx 54 KB

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