AutoService.edmx 51 KB

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