CarServiceModel.edmx 51 KB

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