BaseModel.ssdl 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="Хранилище TourGrigorenkoModel" 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">
  3. <EntityType Name="Country">
  4. <Key>
  5. <PropertyRef Name="Code" />
  6. </Key>
  7. <Property Name="Code" Type="nchar" MaxLength="2" Nullable="false" />
  8. <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
  9. </EntityType>
  10. <EntityType Name="Hotel">
  11. <Key>
  12. <PropertyRef Name="Id" />
  13. </Key>
  14. <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  15. <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
  16. <Property Name="CountOfStars" Type="int" Nullable="false" />
  17. <Property Name="CountryCode" Type="nchar" MaxLength="2" Nullable="false" />
  18. </EntityType>
  19. <EntityType Name="HotelComment">
  20. <Key>
  21. <PropertyRef Name="Id" />
  22. </Key>
  23. <Property Name="Id" Type="int" Nullable="false" />
  24. <Property Name="HotelId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  25. <Property Name="Text" Type="nvarchar(max)" Nullable="false" />
  26. <Property Name="Author" Type="nvarchar" MaxLength="100" Nullable="false" />
  27. <Property Name="CreationDate" Type="datetime" Nullable="false" />
  28. </EntityType>
  29. <EntityType Name="HotelImage">
  30. <Key>
  31. <PropertyRef Name="Id" />
  32. </Key>
  33. <Property Name="Id" Type="int" Nullable="false" />
  34. <Property Name="HotelId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  35. <Property Name="ImageSource" Type="varbinary(max)" Nullable="false" />
  36. </EntityType>
  37. <EntityType Name="HotelOfTour">
  38. <Key>
  39. <PropertyRef Name="HotelId" />
  40. <PropertyRef Name="TourId" />
  41. </Key>
  42. <Property Name="HotelId" Type="int" Nullable="false" />
  43. <Property Name="TourId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  44. </EntityType>
  45. <EntityType Name="sysdiagrams">
  46. <Key>
  47. <PropertyRef Name="diagram_id" />
  48. </Key>
  49. <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
  50. <Property Name="principal_id" Type="int" Nullable="false" />
  51. <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  52. <Property Name="version" Type="int" />
  53. <Property Name="definition" Type="varbinary(max)" />
  54. </EntityType>
  55. <EntityType Name="Tour">
  56. <Key>
  57. <PropertyRef Name="Id" />
  58. </Key>
  59. <Property Name="Id" Type="int" Nullable="false" />
  60. <Property Name="TicketCount" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  61. <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
  62. <Property Name="Description" Type="nvarchar(max)" />
  63. <Property Name="ImagePrewiev" Type="varbinary(max)" />
  64. <Property Name="Price" Type="money" Nullable="false" />
  65. <Property Name="IsActual" Type="bit" Nullable="false" />
  66. </EntityType>
  67. <EntityType Name="Type">
  68. <Key>
  69. <PropertyRef Name="Id" />
  70. </Key>
  71. <Property Name="Id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  72. <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
  73. <Property Name="Description" Type="nvarchar(max)" />
  74. </EntityType>
  75. <EntityType Name="TypeOfTour">
  76. <Key>
  77. <PropertyRef Name="TourId" />
  78. <PropertyRef Name="TypeId" />
  79. </Key>
  80. <Property Name="TourId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  81. <Property Name="TypeId" Type="int" Nullable="false" />
  82. </EntityType>
  83. <Association Name="FK_Hotel_Country">
  84. <End Role="Country" Type="Self.Country" Multiplicity="1" />
  85. <End Role="Hotel" Type="Self.Hotel" Multiplicity="*" />
  86. <ReferentialConstraint>
  87. <Principal Role="Country">
  88. <PropertyRef Name="Code" />
  89. </Principal>
  90. <Dependent Role="Hotel">
  91. <PropertyRef Name="CountryCode" />
  92. </Dependent>
  93. </ReferentialConstraint>
  94. </Association>
  95. <Association Name="FK_HotelComment_Hotel">
  96. <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" />
  97. <End Role="HotelComment" Type="Self.HotelComment" Multiplicity="*" />
  98. <ReferentialConstraint>
  99. <Principal Role="Hotel">
  100. <PropertyRef Name="Id" />
  101. </Principal>
  102. <Dependent Role="HotelComment">
  103. <PropertyRef Name="HotelId" />
  104. </Dependent>
  105. </ReferentialConstraint>
  106. </Association>
  107. <Association Name="FK_HotelImage_Hotel">
  108. <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" />
  109. <End Role="HotelImage" Type="Self.HotelImage" Multiplicity="*" />
  110. <ReferentialConstraint>
  111. <Principal Role="Hotel">
  112. <PropertyRef Name="Id" />
  113. </Principal>
  114. <Dependent Role="HotelImage">
  115. <PropertyRef Name="HotelId" />
  116. </Dependent>
  117. </ReferentialConstraint>
  118. </Association>
  119. <Association Name="FK_HotelOfTour_Hotel">
  120. <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" />
  121. <End Role="HotelOfTour" Type="Self.HotelOfTour" Multiplicity="*" />
  122. <ReferentialConstraint>
  123. <Principal Role="Hotel">
  124. <PropertyRef Name="Id" />
  125. </Principal>
  126. <Dependent Role="HotelOfTour">
  127. <PropertyRef Name="HotelId" />
  128. </Dependent>
  129. </ReferentialConstraint>
  130. </Association>
  131. <Association Name="FK_HotelOfTour_Tour">
  132. <End Role="Tour" Type="Self.Tour" Multiplicity="1" />
  133. <End Role="HotelOfTour" Type="Self.HotelOfTour" Multiplicity="*" />
  134. <ReferentialConstraint>
  135. <Principal Role="Tour">
  136. <PropertyRef Name="Id" />
  137. </Principal>
  138. <Dependent Role="HotelOfTour">
  139. <PropertyRef Name="TourId" />
  140. </Dependent>
  141. </ReferentialConstraint>
  142. </Association>
  143. <Association Name="FK_TypeOfTour_Tour">
  144. <End Role="Tour" Type="Self.Tour" Multiplicity="1" />
  145. <End Role="TypeOfTour" Type="Self.TypeOfTour" Multiplicity="*" />
  146. <ReferentialConstraint>
  147. <Principal Role="Tour">
  148. <PropertyRef Name="Id" />
  149. </Principal>
  150. <Dependent Role="TypeOfTour">
  151. <PropertyRef Name="TourId" />
  152. </Dependent>
  153. </ReferentialConstraint>
  154. </Association>
  155. <Association Name="FK_TypeOfTour_Type">
  156. <End Role="Type" Type="Self.Type" Multiplicity="1" />
  157. <End Role="TypeOfTour" Type="Self.TypeOfTour" Multiplicity="*" />
  158. <ReferentialConstraint>
  159. <Principal Role="Type">
  160. <PropertyRef Name="Id" />
  161. </Principal>
  162. <Dependent Role="TypeOfTour">
  163. <PropertyRef Name="TypeId" />
  164. </Dependent>
  165. </ReferentialConstraint>
  166. </Association>
  167. <EntityContainer Name="Хранилище TourGrigorenkoModelContainer">
  168. <EntitySet Name="Country" EntityType="Self.Country" Schema="dbo" store:Type="Tables" />
  169. <EntitySet Name="Hotel" EntityType="Self.Hotel" Schema="dbo" store:Type="Tables" />
  170. <EntitySet Name="HotelComment" EntityType="Self.HotelComment" Schema="dbo" store:Type="Tables" />
  171. <EntitySet Name="HotelImage" EntityType="Self.HotelImage" Schema="dbo" store:Type="Tables" />
  172. <EntitySet Name="HotelOfTour" EntityType="Self.HotelOfTour" Schema="dbo" store:Type="Tables" />
  173. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
  174. <EntitySet Name="Tour" EntityType="Self.Tour" Schema="dbo" store:Type="Tables" />
  175. <EntitySet Name="Type" EntityType="Self.Type" Schema="dbo" store:Type="Tables" />
  176. <EntitySet Name="TypeOfTour" EntityType="Self.TypeOfTour" Schema="dbo" store:Type="Tables" />
  177. <AssociationSet Name="FK_Hotel_Country" Association="Self.FK_Hotel_Country">
  178. <End Role="Country" EntitySet="Country" />
  179. <End Role="Hotel" EntitySet="Hotel" />
  180. </AssociationSet>
  181. <AssociationSet Name="FK_HotelComment_Hotel" Association="Self.FK_HotelComment_Hotel">
  182. <End Role="Hotel" EntitySet="Hotel" />
  183. <End Role="HotelComment" EntitySet="HotelComment" />
  184. </AssociationSet>
  185. <AssociationSet Name="FK_HotelImage_Hotel" Association="Self.FK_HotelImage_Hotel">
  186. <End Role="Hotel" EntitySet="Hotel" />
  187. <End Role="HotelImage" EntitySet="HotelImage" />
  188. </AssociationSet>
  189. <AssociationSet Name="FK_HotelOfTour_Hotel" Association="Self.FK_HotelOfTour_Hotel">
  190. <End Role="Hotel" EntitySet="Hotel" />
  191. <End Role="HotelOfTour" EntitySet="HotelOfTour" />
  192. </AssociationSet>
  193. <AssociationSet Name="FK_HotelOfTour_Tour" Association="Self.FK_HotelOfTour_Tour">
  194. <End Role="Tour" EntitySet="Tour" />
  195. <End Role="HotelOfTour" EntitySet="HotelOfTour" />
  196. </AssociationSet>
  197. <AssociationSet Name="FK_TypeOfTour_Tour" Association="Self.FK_TypeOfTour_Tour">
  198. <End Role="Tour" EntitySet="Tour" />
  199. <End Role="TypeOfTour" EntitySet="TypeOfTour" />
  200. </AssociationSet>
  201. <AssociationSet Name="FK_TypeOfTour_Type" Association="Self.FK_TypeOfTour_Type">
  202. <End Role="Type" EntitySet="Type" />
  203. <End Role="TypeOfTour" EntitySet="TypeOfTour" />
  204. </AssociationSet>
  205. </EntityContainer>
  206. </Schema>