AutoService.edmx 49 KB

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