BaseModel.csdl 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="TourGrigorenkoModel" 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="Country">
  4. <Key>
  5. <PropertyRef Name="Code" />
  6. </Key>
  7. <Property Name="Code" Type="String" MaxLength="2" FixedLength="true" Unicode="true" Nullable="false" />
  8. <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  9. <NavigationProperty Name="Hotel" Relationship="Self.FK_Hotel_Country" FromRole="Country" ToRole="Hotel" />
  10. </EntityType>
  11. <EntityType Name="Hotel">
  12. <Key>
  13. <PropertyRef Name="Id" />
  14. </Key>
  15. <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  16. <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  17. <Property Name="CountOfStars" Type="Int32" Nullable="false" />
  18. <Property Name="CountryCode" Type="String" MaxLength="2" FixedLength="true" Unicode="true" Nullable="false" />
  19. <NavigationProperty Name="Country" Relationship="Self.FK_Hotel_Country" FromRole="Hotel" ToRole="Country" />
  20. <NavigationProperty Name="HotelComment" Relationship="Self.FK_HotelComment_Hotel" FromRole="Hotel" ToRole="HotelComment" />
  21. <NavigationProperty Name="HotelImage" Relationship="Self.FK_HotelImage_Hotel" FromRole="Hotel" ToRole="HotelImage" />
  22. <NavigationProperty Name="Tour" Relationship="Self.HotelOfTour" FromRole="Hotel" ToRole="Tour" />
  23. </EntityType>
  24. <EntityType Name="HotelComment">
  25. <Key>
  26. <PropertyRef Name="Id" />
  27. </Key>
  28. <Property Name="Id" Type="Int32" Nullable="false" />
  29. <Property Name="HotelId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  30. <Property Name="Text" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" Nullable="false" />
  31. <Property Name="Author" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  32. <Property Name="CreationDate" Type="DateTime" Nullable="false" Precision="3" />
  33. <NavigationProperty Name="Hotel" Relationship="Self.FK_HotelComment_Hotel" FromRole="HotelComment" ToRole="Hotel" />
  34. </EntityType>
  35. <EntityType Name="HotelImage">
  36. <Key>
  37. <PropertyRef Name="Id" />
  38. </Key>
  39. <Property Name="Id" Type="Int32" Nullable="false" />
  40. <Property Name="HotelId" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  41. <Property Name="ImageSource" Type="Binary" MaxLength="Max" FixedLength="false" Nullable="false" />
  42. <NavigationProperty Name="Hotel" Relationship="Self.FK_HotelImage_Hotel" FromRole="HotelImage" ToRole="Hotel" />
  43. </EntityType>
  44. <EntityType Name="sysdiagrams">
  45. <Key>
  46. <PropertyRef Name="diagram_id" />
  47. </Key>
  48. <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
  49. <Property Name="principal_id" Type="Int32" Nullable="false" />
  50. <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  51. <Property Name="version" Type="Int32" />
  52. <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
  53. </EntityType>
  54. <EntityType Name="Tour">
  55. <Key>
  56. <PropertyRef Name="Id" />
  57. </Key>
  58. <Property Name="Id" Type="Int32" Nullable="false" />
  59. <Property Name="TicketCount" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  60. <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  61. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  62. <Property Name="ImagePrewiev" Type="Binary" MaxLength="Max" FixedLength="false" />
  63. <Property Name="Price" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  64. <Property Name="IsActual" Type="Boolean" Nullable="false" />
  65. <NavigationProperty Name="Hotel" Relationship="Self.HotelOfTour" FromRole="Tour" ToRole="Hotel" />
  66. <NavigationProperty Name="Type" Relationship="Self.TypeOfTour" FromRole="Tour" ToRole="Type" />
  67. </EntityType>
  68. <EntityType Name="Type">
  69. <Key>
  70. <PropertyRef Name="Id" />
  71. </Key>
  72. <Property Name="Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  73. <Property Name="Name" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  74. <Property Name="Description" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
  75. <NavigationProperty Name="Tour" Relationship="Self.TypeOfTour" FromRole="Type" ToRole="Tour" />
  76. </EntityType>
  77. <Association Name="FK_Hotel_Country">
  78. <End Role="Country" Type="Self.Country" Multiplicity="1" />
  79. <End Role="Hotel" Type="Self.Hotel" Multiplicity="*" />
  80. <ReferentialConstraint>
  81. <Principal Role="Country">
  82. <PropertyRef Name="Code" />
  83. </Principal>
  84. <Dependent Role="Hotel">
  85. <PropertyRef Name="CountryCode" />
  86. </Dependent>
  87. </ReferentialConstraint>
  88. </Association>
  89. <Association Name="FK_HotelComment_Hotel">
  90. <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" />
  91. <End Role="HotelComment" Type="Self.HotelComment" Multiplicity="*" />
  92. <ReferentialConstraint>
  93. <Principal Role="Hotel">
  94. <PropertyRef Name="Id" />
  95. </Principal>
  96. <Dependent Role="HotelComment">
  97. <PropertyRef Name="HotelId" />
  98. </Dependent>
  99. </ReferentialConstraint>
  100. </Association>
  101. <Association Name="FK_HotelImage_Hotel">
  102. <End Role="Hotel" Type="Self.Hotel" Multiplicity="1" />
  103. <End Role="HotelImage" Type="Self.HotelImage" Multiplicity="*" />
  104. <ReferentialConstraint>
  105. <Principal Role="Hotel">
  106. <PropertyRef Name="Id" />
  107. </Principal>
  108. <Dependent Role="HotelImage">
  109. <PropertyRef Name="HotelId" />
  110. </Dependent>
  111. </ReferentialConstraint>
  112. </Association>
  113. <Association Name="HotelOfTour">
  114. <End Role="Hotel" Type="Self.Hotel" Multiplicity="*" />
  115. <End Role="Tour" Type="Self.Tour" Multiplicity="*" />
  116. </Association>
  117. <Association Name="TypeOfTour">
  118. <End Role="Tour" Type="Self.Tour" Multiplicity="*" />
  119. <End Role="Type" Type="Self.Type" Multiplicity="*" />
  120. </Association>
  121. <EntityContainer Name="TourGrigorenkoEntities" annotation:LazyLoadingEnabled="true">
  122. <EntitySet Name="Country" EntityType="Self.Country" />
  123. <EntitySet Name="Hotel" EntityType="Self.Hotel" />
  124. <EntitySet Name="HotelComment" EntityType="Self.HotelComment" />
  125. <EntitySet Name="HotelImage" EntityType="Self.HotelImage" />
  126. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
  127. <EntitySet Name="Tour" EntityType="Self.Tour" />
  128. <EntitySet Name="Type" EntityType="Self.Type" />
  129. <AssociationSet Name="FK_Hotel_Country" Association="Self.FK_Hotel_Country">
  130. <End Role="Country" EntitySet="Country" />
  131. <End Role="Hotel" EntitySet="Hotel" />
  132. </AssociationSet>
  133. <AssociationSet Name="FK_HotelComment_Hotel" Association="Self.FK_HotelComment_Hotel">
  134. <End Role="Hotel" EntitySet="Hotel" />
  135. <End Role="HotelComment" EntitySet="HotelComment" />
  136. </AssociationSet>
  137. <AssociationSet Name="FK_HotelImage_Hotel" Association="Self.FK_HotelImage_Hotel">
  138. <End Role="Hotel" EntitySet="Hotel" />
  139. <End Role="HotelImage" EntitySet="HotelImage" />
  140. </AssociationSet>
  141. <AssociationSet Name="HotelOfTour" Association="Self.HotelOfTour">
  142. <End Role="Hotel" EntitySet="Hotel" />
  143. <End Role="Tour" EntitySet="Tour" />
  144. </AssociationSet>
  145. <AssociationSet Name="TypeOfTour" Association="Self.TypeOfTour">
  146. <End Role="Tour" EntitySet="Tour" />
  147. <End Role="Type" EntitySet="Type" />
  148. </AssociationSet>
  149. </EntityContainer>
  150. </Schema>