DataBase.edmx 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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="Хранилище school8Model" 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="Client">
  9. <Key>
  10. <PropertyRef Name="ID" />
  11. </Key>
  12. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  13. <Property Name="FirstName" Type="nvarchar" MaxLength="50" Nullable="false" />
  14. <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
  15. <Property Name="Patronymic" Type="nvarchar" MaxLength="50" />
  16. <Property Name="Birthday" Type="date" />
  17. <Property Name="RegistrationDate" Type="datetime" Nullable="false" />
  18. <Property Name="Email" Type="nvarchar" MaxLength="255" />
  19. <Property Name="Phone" Type="nvarchar" MaxLength="20" Nullable="false" />
  20. <Property Name="GenderCode" Type="nchar" MaxLength="1" Nullable="false" />
  21. <Property Name="PhotoPath" Type="nvarchar" MaxLength="1000" />
  22. </EntityType>
  23. <EntityType Name="ClientService">
  24. <Key>
  25. <PropertyRef Name="ID" />
  26. </Key>
  27. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  28. <Property Name="ClientID" Type="int" Nullable="false" />
  29. <Property Name="ServiceID" Type="int" Nullable="false" />
  30. <Property Name="StartTime" Type="datetime" Nullable="false" />
  31. <Property Name="Comment" Type="nvarchar(max)" />
  32. </EntityType>
  33. <EntityType Name="Gender">
  34. <Key>
  35. <PropertyRef Name="Code" />
  36. </Key>
  37. <Property Name="Code" Type="nchar" MaxLength="1" Nullable="false" />
  38. <Property Name="Name" Type="nvarchar" MaxLength="10" />
  39. </EntityType>
  40. <EntityType Name="Service">
  41. <Key>
  42. <PropertyRef Name="ID" />
  43. </Key>
  44. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  45. <Property Name="Title" Type="nvarchar" MaxLength="100" Nullable="false" />
  46. <Property Name="Cost" Type="money" Nullable="false" />
  47. <Property Name="DurationInSeconds" Type="int" Nullable="false" />
  48. <Property Name="Description" Type="nvarchar(max)" />
  49. <Property Name="Discount" Type="float" />
  50. <Property Name="MainImagePath" Type="nvarchar" MaxLength="1000" />
  51. </EntityType>
  52. <EntityType Name="ServicePhoto">
  53. <Key>
  54. <PropertyRef Name="ID" />
  55. </Key>
  56. <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  57. <Property Name="ServiceID" Type="int" Nullable="false" />
  58. <Property Name="PhotoPath" Type="nvarchar" MaxLength="1000" Nullable="false" />
  59. </EntityType>
  60. <Association Name="FK_Client_Gender">
  61. <End Role="Gender" Type="Self.Gender" Multiplicity="1" />
  62. <End Role="Client" Type="Self.Client" Multiplicity="*" />
  63. <ReferentialConstraint>
  64. <Principal Role="Gender">
  65. <PropertyRef Name="Code" />
  66. </Principal>
  67. <Dependent Role="Client">
  68. <PropertyRef Name="GenderCode" />
  69. </Dependent>
  70. </ReferentialConstraint>
  71. </Association>
  72. <Association Name="FK_ClientService_Client">
  73. <End Role="Client" Type="Self.Client" Multiplicity="1" />
  74. <End Role="ClientService" Type="Self.ClientService" Multiplicity="*" />
  75. <ReferentialConstraint>
  76. <Principal Role="Client">
  77. <PropertyRef Name="ID" />
  78. </Principal>
  79. <Dependent Role="ClientService">
  80. <PropertyRef Name="ClientID" />
  81. </Dependent>
  82. </ReferentialConstraint>
  83. </Association>
  84. <Association Name="FK_ClientService_Service">
  85. <End Role="Service" Type="Self.Service" Multiplicity="1">
  86. <OnDelete Action="Cascade" />
  87. </End>
  88. <End Role="ClientService" Type="Self.ClientService" Multiplicity="*" />
  89. <ReferentialConstraint>
  90. <Principal Role="Service">
  91. <PropertyRef Name="ID" />
  92. </Principal>
  93. <Dependent Role="ClientService">
  94. <PropertyRef Name="ServiceID" />
  95. </Dependent>
  96. </ReferentialConstraint>
  97. </Association>
  98. <Association Name="FK_ServicePhoto_Service">
  99. <End Role="Service" Type="Self.Service" Multiplicity="1">
  100. <OnDelete Action="Cascade" />
  101. </End>
  102. <End Role="ServicePhoto" Type="Self.ServicePhoto" Multiplicity="*" />
  103. <ReferentialConstraint>
  104. <Principal Role="Service">
  105. <PropertyRef Name="ID" />
  106. </Principal>
  107. <Dependent Role="ServicePhoto">
  108. <PropertyRef Name="ServiceID" />
  109. </Dependent>
  110. </ReferentialConstraint>
  111. </Association>
  112. <EntityContainer Name="Хранилище school8ModelContainer">
  113. <EntitySet Name="Client" EntityType="Self.Client" Schema="dbo" store:Type="Tables" />
  114. <EntitySet Name="ClientService" EntityType="Self.ClientService" Schema="dbo" store:Type="Tables" />
  115. <EntitySet Name="Gender" EntityType="Self.Gender" Schema="dbo" store:Type="Tables" />
  116. <EntitySet Name="Service" EntityType="Self.Service" Schema="dbo" store:Type="Tables" />
  117. <EntitySet Name="ServicePhoto" EntityType="Self.ServicePhoto" Schema="dbo" store:Type="Tables" />
  118. <AssociationSet Name="FK_Client_Gender" Association="Self.FK_Client_Gender">
  119. <End Role="Gender" EntitySet="Gender" />
  120. <End Role="Client" EntitySet="Client" />
  121. </AssociationSet>
  122. <AssociationSet Name="FK_ClientService_Client" Association="Self.FK_ClientService_Client">
  123. <End Role="Client" EntitySet="Client" />
  124. <End Role="ClientService" EntitySet="ClientService" />
  125. </AssociationSet>
  126. <AssociationSet Name="FK_ClientService_Service" Association="Self.FK_ClientService_Service">
  127. <End Role="Service" EntitySet="Service" />
  128. <End Role="ClientService" EntitySet="ClientService" />
  129. </AssociationSet>
  130. <AssociationSet Name="FK_ServicePhoto_Service" Association="Self.FK_ServicePhoto_Service">
  131. <End Role="Service" EntitySet="Service" />
  132. <End Role="ServicePhoto" EntitySet="ServicePhoto" />
  133. </AssociationSet>
  134. </EntityContainer>
  135. </Schema>
  136. </edmx:StorageModels>
  137. <!-- CSDL content -->
  138. <edmx:ConceptualModels>
  139. <Schema Namespace="school8Model" 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">
  140. <EntityType Name="Client">
  141. <Key>
  142. <PropertyRef Name="ID" />
  143. </Key>
  144. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  145. <Property Name="FirstName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  146. <Property Name="LastName" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  147. <Property Name="Patronymic" Type="String" MaxLength="50" FixedLength="false" Unicode="true" />
  148. <Property Name="Birthday" Type="DateTime" Precision="0" />
  149. <Property Name="RegistrationDate" Type="DateTime" Nullable="false" Precision="3" />
  150. <Property Name="Email" Type="String" MaxLength="255" FixedLength="false" Unicode="true" />
  151. <Property Name="Phone" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  152. <Property Name="GenderCode" Type="String" MaxLength="1" FixedLength="true" Unicode="true" Nullable="false" />
  153. <Property Name="PhotoPath" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" />
  154. <NavigationProperty Name="Gender" Relationship="Self.FK_Client_Gender" FromRole="Client" ToRole="Gender" />
  155. <NavigationProperty Name="ClientService" Relationship="Self.FK_ClientService_Client" FromRole="Client" ToRole="ClientService" />
  156. </EntityType>
  157. <EntityType Name="ClientService">
  158. <Key>
  159. <PropertyRef Name="ID" />
  160. </Key>
  161. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  162. <Property Name="ClientID" Type="Int32" Nullable="false" />
  163. <Property Name="ServiceID" Type="Int32" Nullable="false" />
  164. <Property Name="StartTime" Type="DateTime" Nullable="false" Precision="3" />
  165. <Property Name="Comment" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  166. <NavigationProperty Name="Client" Relationship="Self.FK_ClientService_Client" FromRole="ClientService" ToRole="Client" />
  167. <NavigationProperty Name="Service" Relationship="Self.FK_ClientService_Service" FromRole="ClientService" ToRole="Service" />
  168. </EntityType>
  169. <EntityType Name="Gender">
  170. <Key>
  171. <PropertyRef Name="Code" />
  172. </Key>
  173. <Property Name="Code" Type="String" MaxLength="1" FixedLength="true" Unicode="true" Nullable="false" />
  174. <Property Name="Name" Type="String" MaxLength="10" FixedLength="false" Unicode="true" />
  175. <NavigationProperty Name="Client" Relationship="Self.FK_Client_Gender" FromRole="Gender" ToRole="Client" />
  176. </EntityType>
  177. <EntityType Name="Service">
  178. <Key>
  179. <PropertyRef Name="ID" />
  180. </Key>
  181. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  182. <Property Name="Title" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  183. <Property Name="Cost" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  184. <Property Name="DurationInSeconds" Type="Int32" Nullable="false" />
  185. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  186. <Property Name="Discount" Type="Double" />
  187. <Property Name="MainImagePath" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" />
  188. <NavigationProperty Name="ClientService" Relationship="Self.FK_ClientService_Service" FromRole="Service" ToRole="ClientService" />
  189. <NavigationProperty Name="ServicePhoto" Relationship="Self.FK_ServicePhoto_Service" FromRole="Service" ToRole="ServicePhoto" />
  190. </EntityType>
  191. <EntityType Name="ServicePhoto">
  192. <Key>
  193. <PropertyRef Name="ID" />
  194. </Key>
  195. <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  196. <Property Name="ServiceID" Type="Int32" Nullable="false" />
  197. <Property Name="PhotoPath" Type="String" MaxLength="1000" FixedLength="false" Unicode="true" Nullable="false" />
  198. <NavigationProperty Name="Service" Relationship="Self.FK_ServicePhoto_Service" FromRole="ServicePhoto" ToRole="Service" />
  199. </EntityType>
  200. <Association Name="FK_Client_Gender">
  201. <End Role="Gender" Type="Self.Gender" Multiplicity="1" />
  202. <End Role="Client" Type="Self.Client" Multiplicity="*" />
  203. <ReferentialConstraint>
  204. <Principal Role="Gender">
  205. <PropertyRef Name="Code" />
  206. </Principal>
  207. <Dependent Role="Client">
  208. <PropertyRef Name="GenderCode" />
  209. </Dependent>
  210. </ReferentialConstraint>
  211. </Association>
  212. <Association Name="FK_ClientService_Client">
  213. <End Role="Client" Type="Self.Client" Multiplicity="1" />
  214. <End Role="ClientService" Type="Self.ClientService" Multiplicity="*" />
  215. <ReferentialConstraint>
  216. <Principal Role="Client">
  217. <PropertyRef Name="ID" />
  218. </Principal>
  219. <Dependent Role="ClientService">
  220. <PropertyRef Name="ClientID" />
  221. </Dependent>
  222. </ReferentialConstraint>
  223. </Association>
  224. <Association Name="FK_ClientService_Service">
  225. <End Role="Service" Type="Self.Service" Multiplicity="1">
  226. <OnDelete Action="Cascade" />
  227. </End>
  228. <End Role="ClientService" Type="Self.ClientService" Multiplicity="*" />
  229. <ReferentialConstraint>
  230. <Principal Role="Service">
  231. <PropertyRef Name="ID" />
  232. </Principal>
  233. <Dependent Role="ClientService">
  234. <PropertyRef Name="ServiceID" />
  235. </Dependent>
  236. </ReferentialConstraint>
  237. </Association>
  238. <Association Name="FK_ServicePhoto_Service">
  239. <End Role="Service" Type="Self.Service" Multiplicity="1">
  240. <OnDelete Action="Cascade" />
  241. </End>
  242. <End Role="ServicePhoto" Type="Self.ServicePhoto" Multiplicity="*" />
  243. <ReferentialConstraint>
  244. <Principal Role="Service">
  245. <PropertyRef Name="ID" />
  246. </Principal>
  247. <Dependent Role="ServicePhoto">
  248. <PropertyRef Name="ServiceID" />
  249. </Dependent>
  250. </ReferentialConstraint>
  251. </Association>
  252. <EntityContainer Name="Entities" annotation:LazyLoadingEnabled="true">
  253. <EntitySet Name="Client" EntityType="Self.Client" />
  254. <EntitySet Name="ClientService" EntityType="Self.ClientService" />
  255. <EntitySet Name="Gender" EntityType="Self.Gender" />
  256. <EntitySet Name="Service" EntityType="Self.Service" />
  257. <EntitySet Name="ServicePhoto" EntityType="Self.ServicePhoto" />
  258. <AssociationSet Name="FK_Client_Gender" Association="Self.FK_Client_Gender">
  259. <End Role="Gender" EntitySet="Gender" />
  260. <End Role="Client" EntitySet="Client" />
  261. </AssociationSet>
  262. <AssociationSet Name="FK_ClientService_Client" Association="Self.FK_ClientService_Client">
  263. <End Role="Client" EntitySet="Client" />
  264. <End Role="ClientService" EntitySet="ClientService" />
  265. </AssociationSet>
  266. <AssociationSet Name="FK_ClientService_Service" Association="Self.FK_ClientService_Service">
  267. <End Role="Service" EntitySet="Service" />
  268. <End Role="ClientService" EntitySet="ClientService" />
  269. </AssociationSet>
  270. <AssociationSet Name="FK_ServicePhoto_Service" Association="Self.FK_ServicePhoto_Service">
  271. <End Role="Service" EntitySet="Service" />
  272. <End Role="ServicePhoto" EntitySet="ServicePhoto" />
  273. </AssociationSet>
  274. </EntityContainer>
  275. </Schema>
  276. </edmx:ConceptualModels>
  277. <!-- C-S mapping content -->
  278. <edmx:Mappings>
  279. <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
  280. <EntityContainerMapping StorageEntityContainer="Хранилище school8ModelContainer" CdmEntityContainer="Entities">
  281. <EntitySetMapping Name="Client">
  282. <EntityTypeMapping TypeName="school8Model.Client">
  283. <MappingFragment StoreEntitySet="Client">
  284. <ScalarProperty Name="ID" ColumnName="ID" />
  285. <ScalarProperty Name="FirstName" ColumnName="FirstName" />
  286. <ScalarProperty Name="LastName" ColumnName="LastName" />
  287. <ScalarProperty Name="Patronymic" ColumnName="Patronymic" />
  288. <ScalarProperty Name="Birthday" ColumnName="Birthday" />
  289. <ScalarProperty Name="RegistrationDate" ColumnName="RegistrationDate" />
  290. <ScalarProperty Name="Email" ColumnName="Email" />
  291. <ScalarProperty Name="Phone" ColumnName="Phone" />
  292. <ScalarProperty Name="GenderCode" ColumnName="GenderCode" />
  293. <ScalarProperty Name="PhotoPath" ColumnName="PhotoPath" />
  294. </MappingFragment>
  295. </EntityTypeMapping>
  296. </EntitySetMapping>
  297. <EntitySetMapping Name="ClientService">
  298. <EntityTypeMapping TypeName="school8Model.ClientService">
  299. <MappingFragment StoreEntitySet="ClientService">
  300. <ScalarProperty Name="ID" ColumnName="ID" />
  301. <ScalarProperty Name="ClientID" ColumnName="ClientID" />
  302. <ScalarProperty Name="ServiceID" ColumnName="ServiceID" />
  303. <ScalarProperty Name="StartTime" ColumnName="StartTime" />
  304. <ScalarProperty Name="Comment" ColumnName="Comment" />
  305. </MappingFragment>
  306. </EntityTypeMapping>
  307. </EntitySetMapping>
  308. <EntitySetMapping Name="Gender">
  309. <EntityTypeMapping TypeName="school8Model.Gender">
  310. <MappingFragment StoreEntitySet="Gender">
  311. <ScalarProperty Name="Code" ColumnName="Code" />
  312. <ScalarProperty Name="Name" ColumnName="Name" />
  313. </MappingFragment>
  314. </EntityTypeMapping>
  315. </EntitySetMapping>
  316. <EntitySetMapping Name="Service">
  317. <EntityTypeMapping TypeName="school8Model.Service">
  318. <MappingFragment StoreEntitySet="Service">
  319. <ScalarProperty Name="ID" ColumnName="ID" />
  320. <ScalarProperty Name="Title" ColumnName="Title" />
  321. <ScalarProperty Name="Cost" ColumnName="Cost" />
  322. <ScalarProperty Name="DurationInSeconds" ColumnName="DurationInSeconds" />
  323. <ScalarProperty Name="Description" ColumnName="Description" />
  324. <ScalarProperty Name="Discount" ColumnName="Discount" />
  325. <ScalarProperty Name="MainImagePath" ColumnName="MainImagePath" />
  326. </MappingFragment>
  327. </EntityTypeMapping>
  328. </EntitySetMapping>
  329. <EntitySetMapping Name="ServicePhoto">
  330. <EntityTypeMapping TypeName="school8Model.ServicePhoto">
  331. <MappingFragment StoreEntitySet="ServicePhoto">
  332. <ScalarProperty Name="ID" ColumnName="ID" />
  333. <ScalarProperty Name="ServiceID" ColumnName="ServiceID" />
  334. <ScalarProperty Name="PhotoPath" ColumnName="PhotoPath" />
  335. </MappingFragment>
  336. </EntityTypeMapping>
  337. </EntitySetMapping>
  338. </EntityContainerMapping>
  339. </Mapping>
  340. </edmx:Mappings>
  341. </edmx:Runtime>
  342. <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  343. <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
  344. <Connection>
  345. <DesignerInfoPropertySet>
  346. <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
  347. </DesignerInfoPropertySet>
  348. </Connection>
  349. <Options>
  350. <DesignerInfoPropertySet>
  351. <DesignerProperty Name="ValidateOnBuild" Value="true" />
  352. <DesignerProperty Name="EnablePluralization" Value="false" />
  353. <DesignerProperty Name="IncludeForeignKeysInModel" Value="true" />
  354. <DesignerProperty Name="UseLegacyProvider" Value="false" />
  355. <DesignerProperty Name="CodeGenerationStrategy" Value="Нет" />
  356. </DesignerInfoPropertySet>
  357. </Options>
  358. <!-- Diagram content (shape and connector positions) -->
  359. <Diagrams></Diagrams>
  360. </Designer>
  361. </edmx:Edmx>