Model1.csdl 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="Model" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
  3. <EntityType Name="Client">
  4. <Key>
  5. <PropertyRef Name="id" />
  6. </Key>
  7. <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  8. <Property Name="Фамилия" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  9. <Property Name="Имя" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  10. <Property Name="Отчество" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  11. <Property Name="Пол" Type="Int32" Nullable="false" />
  12. <Property Name="Телефон" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  13. <Property Name="Дата_рождения" Type="DateTime" Nullable="false" Precision="7" />
  14. <Property Name="Email" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  15. <Property Name="Дата_регистрации" Type="DateTime" Nullable="false" Precision="7" />
  16. <NavigationProperty Name="Gender" Relationship="Self.FK_Client_Gender" FromRole="Client" ToRole="Gender" />
  17. <NavigationProperty Name="Serviceclient" Relationship="Self.FK_Serviceclient_Client" FromRole="Client" ToRole="Serviceclient" />
  18. <NavigationProperty Name="Tag" Relationship="Self.TagOfClient" FromRole="Client" ToRole="Tag" />
  19. </EntityType>
  20. <EntityType Name="DocumentByService">
  21. <Key>
  22. <PropertyRef Name="ID" />
  23. </Key>
  24. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  25. <Property Name="ClientServiceID" Type="Int32" Nullable="false" />
  26. <Property Name="DocumentPath" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" Nullable="false" />
  27. <NavigationProperty Name="Serviceclient" Relationship="Self.FK_DocumentByService_Serviceclient" FromRole="DocumentByService" ToRole="Serviceclient" />
  28. </EntityType>
  29. <EntityType Name="Gender">
  30. <Key>
  31. <PropertyRef Name="Code" />
  32. </Key>
  33. <Property Name="Code" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  34. <Property Name="Name" Type="String" MaxLength="10" FixedLength="false" Unicode="true" />
  35. <NavigationProperty Name="Client" Relationship="Self.FK_Client_Gender" FromRole="Gender" ToRole="Client" />
  36. </EntityType>
  37. <EntityType Name="Manufacturer">
  38. <Key>
  39. <PropertyRef Name="ID" />
  40. </Key>
  41. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  42. <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  43. <Property Name="StartDate" Type="DateTime" Precision="0" />
  44. <NavigationProperty Name="Product" Relationship="Self.FK_Product_Manufacturer" FromRole="Manufacturer" ToRole="Product" />
  45. </EntityType>
  46. <EntityType Name="Product">
  47. <Key>
  48. <PropertyRef Name="ID" />
  49. </Key>
  50. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  51. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  52. <Property Name="Cost" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  53. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  54. <Property Name="MainImagePath" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" />
  55. <Property Name="IsActive" Type="Boolean" Nullable="false" />
  56. <Property Name="ManufacturerID" Type="Int32" />
  57. <NavigationProperty Name="Manufacturer" Relationship="Self.FK_Product_Manufacturer" FromRole="Product" ToRole="Manufacturer" />
  58. <NavigationProperty Name="ProductPhoto" Relationship="Self.FK_ProductPhoto_Product" FromRole="Product" ToRole="ProductPhoto" />
  59. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Product" FromRole="Product" ToRole="ProductSale" />
  60. <NavigationProperty Name="Product1" Relationship="Self.AttachedProduct" FromRole="Product" ToRole="Product1" />
  61. <NavigationProperty Name="Product2" Relationship="Self.AttachedProduct" FromRole="Product1" ToRole="Product" />
  62. </EntityType>
  63. <EntityType Name="ProductPhoto">
  64. <Key>
  65. <PropertyRef Name="ID" />
  66. </Key>
  67. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  68. <Property Name="ProductID" Type="Int32" Nullable="false" />
  69. <Property Name="PhotoPath" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" Nullable="false" />
  70. <NavigationProperty Name="Product" Relationship="Self.FK_ProductPhoto_Product" FromRole="ProductPhoto" ToRole="Product" />
  71. </EntityType>
  72. <EntityType Name="ProductSale">
  73. <Key>
  74. <PropertyRef Name="ID" />
  75. </Key>
  76. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  77. <Property Name="SaleDate" Type="DateTime" Nullable="false" Precision="3" />
  78. <Property Name="ProductID" Type="Int32" Nullable="false" />
  79. <Property Name="Quantity" Type="Int32" Nullable="false" />
  80. <Property Name="ClientServiceID" Type="Int32" />
  81. <NavigationProperty Name="Product" Relationship="Self.FK_ProductSale_Product" FromRole="ProductSale" ToRole="Product" />
  82. <NavigationProperty Name="Serviceclient" Relationship="Self.FK_ProductSale_Serviceclient" FromRole="ProductSale" ToRole="Serviceclient" />
  83. </EntityType>
  84. <EntityType Name="Service">
  85. <Key>
  86. <PropertyRef Name="id" />
  87. </Key>
  88. <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  89. <Property Name="Наименование_услуги" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  90. <Property Name="Главное_изображение" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  91. <Property Name="Длительность" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  92. <Property Name="Стоимость" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  93. <Property Name="Действующая_скидка" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  94. <NavigationProperty Name="Serviceclient" Relationship="Self.FK_Serviceclient_Service" FromRole="Service" ToRole="Serviceclient" />
  95. <NavigationProperty Name="ServicePhoto" Relationship="Self.FK_ServicePhoto_Service" FromRole="Service" ToRole="ServicePhoto" />
  96. </EntityType>
  97. <EntityType Name="Serviceclient">
  98. <Key>
  99. <PropertyRef Name="id" />
  100. </Key>
  101. <Property Name="id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  102. <Property Name="услуга" Type="Int32" Nullable="false" />
  103. <Property Name="дата" Type="DateTime" Nullable="false" Precision="7" />
  104. <Property Name="клиент" Type="Int32" Nullable="false" />
  105. <Property Name="описания" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  106. <NavigationProperty Name="Client" Relationship="Self.FK_Serviceclient_Client" FromRole="Serviceclient" ToRole="Client" />
  107. <NavigationProperty Name="DocumentByService" Relationship="Self.FK_DocumentByService_Serviceclient" FromRole="Serviceclient" ToRole="DocumentByService" />
  108. <NavigationProperty Name="ProductSale" Relationship="Self.FK_ProductSale_Serviceclient" FromRole="Serviceclient" ToRole="ProductSale" />
  109. <NavigationProperty Name="Service" Relationship="Self.FK_Serviceclient_Service" FromRole="Serviceclient" ToRole="Service" />
  110. </EntityType>
  111. <EntityType Name="ServicePhoto">
  112. <Key>
  113. <PropertyRef Name="ID" />
  114. </Key>
  115. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  116. <Property Name="ServiceID" Type="Int32" Nullable="false" />
  117. <Property Name="PhotoPath" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" Nullable="false" />
  118. <NavigationProperty Name="Service" Relationship="Self.FK_ServicePhoto_Service" FromRole="ServicePhoto" ToRole="Service" />
  119. </EntityType>
  120. <EntityType Name="sysdiagrams">
  121. <Key>
  122. <PropertyRef Name="diagram_id" />
  123. </Key>
  124. <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
  125. <Property Name="principal_id" Type="Int32" Nullable="false" />
  126. <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  127. <Property Name="version" Type="Int32" />
  128. <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
  129. </EntityType>
  130. <EntityType Name="Tag">
  131. <Key>
  132. <PropertyRef Name="ID" />
  133. </Key>
  134. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  135. <Property Name="Title" Type="String" MaxLength="30" FixedLength="false" Unicode="true" Nullable="false" />
  136. <Property Name="Color" Type="String" MaxLength="6" FixedLength="true" Unicode="true" Nullable="false" />
  137. <NavigationProperty Name="Client" Relationship="Self.TagOfClient" FromRole="Tag" ToRole="Client" />
  138. </EntityType>
  139. <EntityType Name="учетка">
  140. <Key>
  141. <PropertyRef Name="login" />
  142. </Key>
  143. <Property Name="login" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  144. <Property Name="pass" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  145. </EntityType>
  146. <Association Name="FK_Client_Gender">
  147. <End Role="Gender" Type="Self.Gender" Multiplicity="1" />
  148. <End Role="Client" Type="Self.Client" Multiplicity="*" />
  149. <ReferentialConstraint>
  150. <Principal Role="Gender">
  151. <PropertyRef Name="Code" />
  152. </Principal>
  153. <Dependent Role="Client">
  154. <PropertyRef Name="Пол" />
  155. </Dependent>
  156. </ReferentialConstraint>
  157. </Association>
  158. <Association Name="FK_Serviceclient_Client">
  159. <End Role="Client" Type="Self.Client" Multiplicity="1" />
  160. <End Role="Serviceclient" Type="Self.Serviceclient" Multiplicity="*" />
  161. <ReferentialConstraint>
  162. <Principal Role="Client">
  163. <PropertyRef Name="id" />
  164. </Principal>
  165. <Dependent Role="Serviceclient">
  166. <PropertyRef Name="клиент" />
  167. </Dependent>
  168. </ReferentialConstraint>
  169. </Association>
  170. <Association Name="FK_DocumentByService_Serviceclient">
  171. <End Role="Serviceclient" Type="Self.Serviceclient" Multiplicity="1" />
  172. <End Role="DocumentByService" Type="Self.DocumentByService" Multiplicity="*" />
  173. <ReferentialConstraint>
  174. <Principal Role="Serviceclient">
  175. <PropertyRef Name="id" />
  176. </Principal>
  177. <Dependent Role="DocumentByService">
  178. <PropertyRef Name="ClientServiceID" />
  179. </Dependent>
  180. </ReferentialConstraint>
  181. </Association>
  182. <Association Name="FK_Product_Manufacturer">
  183. <End Role="Manufacturer" Type="Self.Manufacturer" Multiplicity="0..1" />
  184. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  185. <ReferentialConstraint>
  186. <Principal Role="Manufacturer">
  187. <PropertyRef Name="ID" />
  188. </Principal>
  189. <Dependent Role="Product">
  190. <PropertyRef Name="ManufacturerID" />
  191. </Dependent>
  192. </ReferentialConstraint>
  193. </Association>
  194. <Association Name="FK_ProductPhoto_Product">
  195. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  196. <End Role="ProductPhoto" Type="Self.ProductPhoto" Multiplicity="*" />
  197. <ReferentialConstraint>
  198. <Principal Role="Product">
  199. <PropertyRef Name="ID" />
  200. </Principal>
  201. <Dependent Role="ProductPhoto">
  202. <PropertyRef Name="ProductID" />
  203. </Dependent>
  204. </ReferentialConstraint>
  205. </Association>
  206. <Association Name="FK_ProductSale_Product">
  207. <End Role="Product" Type="Self.Product" Multiplicity="1" />
  208. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  209. <ReferentialConstraint>
  210. <Principal Role="Product">
  211. <PropertyRef Name="ID" />
  212. </Principal>
  213. <Dependent Role="ProductSale">
  214. <PropertyRef Name="ProductID" />
  215. </Dependent>
  216. </ReferentialConstraint>
  217. </Association>
  218. <Association Name="FK_ProductSale_Serviceclient">
  219. <End Role="Serviceclient" Type="Self.Serviceclient" Multiplicity="0..1" />
  220. <End Role="ProductSale" Type="Self.ProductSale" Multiplicity="*" />
  221. <ReferentialConstraint>
  222. <Principal Role="Serviceclient">
  223. <PropertyRef Name="id" />
  224. </Principal>
  225. <Dependent Role="ProductSale">
  226. <PropertyRef Name="ClientServiceID" />
  227. </Dependent>
  228. </ReferentialConstraint>
  229. </Association>
  230. <Association Name="FK_Serviceclient_Service">
  231. <End Role="Service" Type="Self.Service" Multiplicity="1" />
  232. <End Role="Serviceclient" Type="Self.Serviceclient" Multiplicity="*" />
  233. <ReferentialConstraint>
  234. <Principal Role="Service">
  235. <PropertyRef Name="id" />
  236. </Principal>
  237. <Dependent Role="Serviceclient">
  238. <PropertyRef Name="услуга" />
  239. </Dependent>
  240. </ReferentialConstraint>
  241. </Association>
  242. <Association Name="FK_ServicePhoto_Service">
  243. <End Role="Service" Type="Self.Service" Multiplicity="1" />
  244. <End Role="ServicePhoto" Type="Self.ServicePhoto" Multiplicity="*" />
  245. <ReferentialConstraint>
  246. <Principal Role="Service">
  247. <PropertyRef Name="id" />
  248. </Principal>
  249. <Dependent Role="ServicePhoto">
  250. <PropertyRef Name="ServiceID" />
  251. </Dependent>
  252. </ReferentialConstraint>
  253. </Association>
  254. <Association Name="AttachedProduct">
  255. <End Role="Product" Type="Self.Product" Multiplicity="*" />
  256. <End Role="Product1" Type="Self.Product" Multiplicity="*" />
  257. </Association>
  258. <Association Name="TagOfClient">
  259. <End Role="Client" Type="Self.Client" Multiplicity="*" />
  260. <End Role="Tag" Type="Self.Tag" Multiplicity="*" />
  261. </Association>
  262. <EntityContainer Name="Gayduk_pr2Entities1" annotation:LazyLoadingEnabled="true">
  263. <EntitySet Name="Client" EntityType="Self.Client" />
  264. <EntitySet Name="DocumentByService" EntityType="Self.DocumentByService" />
  265. <EntitySet Name="Gender" EntityType="Self.Gender" />
  266. <EntitySet Name="Manufacturer" EntityType="Self.Manufacturer" />
  267. <EntitySet Name="Product" EntityType="Self.Product" />
  268. <EntitySet Name="ProductPhoto" EntityType="Self.ProductPhoto" />
  269. <EntitySet Name="ProductSale" EntityType="Self.ProductSale" />
  270. <EntitySet Name="Service" EntityType="Self.Service" />
  271. <EntitySet Name="Serviceclient" EntityType="Self.Serviceclient" />
  272. <EntitySet Name="ServicePhoto" EntityType="Self.ServicePhoto" />
  273. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
  274. <EntitySet Name="Tag" EntityType="Self.Tag" />
  275. <EntitySet Name="учетка" EntityType="Self.учетка" />
  276. <AssociationSet Name="FK_Client_Gender" Association="Self.FK_Client_Gender">
  277. <End Role="Gender" EntitySet="Gender" />
  278. <End Role="Client" EntitySet="Client" />
  279. </AssociationSet>
  280. <AssociationSet Name="FK_Serviceclient_Client" Association="Self.FK_Serviceclient_Client">
  281. <End Role="Client" EntitySet="Client" />
  282. <End Role="Serviceclient" EntitySet="Serviceclient" />
  283. </AssociationSet>
  284. <AssociationSet Name="FK_DocumentByService_Serviceclient" Association="Self.FK_DocumentByService_Serviceclient">
  285. <End Role="Serviceclient" EntitySet="Serviceclient" />
  286. <End Role="DocumentByService" EntitySet="DocumentByService" />
  287. </AssociationSet>
  288. <AssociationSet Name="FK_Product_Manufacturer" Association="Self.FK_Product_Manufacturer">
  289. <End Role="Manufacturer" EntitySet="Manufacturer" />
  290. <End Role="Product" EntitySet="Product" />
  291. </AssociationSet>
  292. <AssociationSet Name="FK_ProductPhoto_Product" Association="Self.FK_ProductPhoto_Product">
  293. <End Role="Product" EntitySet="Product" />
  294. <End Role="ProductPhoto" EntitySet="ProductPhoto" />
  295. </AssociationSet>
  296. <AssociationSet Name="FK_ProductSale_Product" Association="Self.FK_ProductSale_Product">
  297. <End Role="Product" EntitySet="Product" />
  298. <End Role="ProductSale" EntitySet="ProductSale" />
  299. </AssociationSet>
  300. <AssociationSet Name="FK_ProductSale_Serviceclient" Association="Self.FK_ProductSale_Serviceclient">
  301. <End Role="Serviceclient" EntitySet="Serviceclient" />
  302. <End Role="ProductSale" EntitySet="ProductSale" />
  303. </AssociationSet>
  304. <AssociationSet Name="FK_Serviceclient_Service" Association="Self.FK_Serviceclient_Service">
  305. <End Role="Service" EntitySet="Service" />
  306. <End Role="Serviceclient" EntitySet="Serviceclient" />
  307. </AssociationSet>
  308. <AssociationSet Name="FK_ServicePhoto_Service" Association="Self.FK_ServicePhoto_Service">
  309. <End Role="Service" EntitySet="Service" />
  310. <End Role="ServicePhoto" EntitySet="ServicePhoto" />
  311. </AssociationSet>
  312. <AssociationSet Name="AttachedProduct" Association="Self.AttachedProduct">
  313. <End Role="Product" EntitySet="Product" />
  314. <End Role="Product1" EntitySet="Product" />
  315. </AssociationSet>
  316. <AssociationSet Name="TagOfClient" Association="Self.TagOfClient">
  317. <End Role="Client" EntitySet="Client" />
  318. <End Role="Tag" EntitySet="Tag" />
  319. </AssociationSet>
  320. </EntityContainer>
  321. </Schema>