Model1.csdl 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="gr691_aasModel" 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="Dish">
  4. <Key>
  5. <PropertyRef Name="Dish_id" />
  6. </Key>
  7. <Property Name="Dish_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  8. <Property Name="Name_Dish" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  9. <Property Name="TranslationNameDish" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  10. <Property Name="Cost" Type="Decimal" Precision="18" Scale="0" Nullable="false" />
  11. <Property Name="Time" Type="String" MaxLength="50" FixedLength="true" Unicode="true" Nullable="false" />
  12. <NavigationProperty Name="Order" Relationship="Self.FK_Order_Dish" FromRole="Dish" ToRole="Order" />
  13. </EntityType>
  14. <EntityType Name="Order">
  15. <Key>
  16. <PropertyRef Name="Order_Id" />
  17. </Key>
  18. <Property Name="Order_Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  19. <Property Name="Staff_Id" Type="Int32" Nullable="false" />
  20. <Property Name="Dish_Id" Type="Int32" Nullable="false" />
  21. <Property Name="StatusDish_id" Type="Int32" Nullable="false" />
  22. <NavigationProperty Name="Dish" Relationship="Self.FK_Order_Dish" FromRole="Order" ToRole="Dish" />
  23. <NavigationProperty Name="Staff" Relationship="Self.FK_Order_Staff" FromRole="Order" ToRole="Staff" />
  24. <NavigationProperty Name="StatusDish" Relationship="Self.FK_Order_StatusDish" FromRole="Order" ToRole="StatusDish" />
  25. </EntityType>
  26. <EntityType Name="Post">
  27. <Key>
  28. <PropertyRef Name="Post_Id" />
  29. </Key>
  30. <Property Name="Post_Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  31. <Property Name="NamePost" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  32. <NavigationProperty Name="Staff" Relationship="Self.FK_Staff_Post" FromRole="Post" ToRole="Staff" />
  33. </EntityType>
  34. <EntityType Name="Staff">
  35. <Key>
  36. <PropertyRef Name="Staff_id" />
  37. </Key>
  38. <Property Name="Staff_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  39. <Property Name="Login" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  40. <Property Name="LastName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  41. <Property Name="FirstName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" />
  42. <Property Name="MiddleName" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  43. <Property Name="Status_id" Type="Int32" Nullable="false" />
  44. <Property Name="Post_id" Type="Int32" Nullable="false" />
  45. <Property Name="Password" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  46. <NavigationProperty Name="Order" Relationship="Self.FK_Order_Staff" FromRole="Staff" ToRole="Order" />
  47. <NavigationProperty Name="Post" Relationship="Self.FK_Staff_Post" FromRole="Staff" ToRole="Post" />
  48. <NavigationProperty Name="Status" Relationship="Self.FK_Staff_Status" FromRole="Staff" ToRole="Status" />
  49. </EntityType>
  50. <EntityType Name="Status">
  51. <Key>
  52. <PropertyRef Name="Status_Id" />
  53. </Key>
  54. <Property Name="Status_Id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  55. <Property Name="NameStatus" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  56. <NavigationProperty Name="Staff" Relationship="Self.FK_Staff_Status" FromRole="Status" ToRole="Staff" />
  57. </EntityType>
  58. <EntityType Name="StatusDish">
  59. <Key>
  60. <PropertyRef Name="StatusDish_id" />
  61. </Key>
  62. <Property Name="StatusDish_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  63. <Property Name="NameStatusDish" Type="String" MaxLength="50" FixedLength="false" Unicode="true" Nullable="false" />
  64. <NavigationProperty Name="Order" Relationship="Self.FK_Order_StatusDish" FromRole="StatusDish" ToRole="Order" />
  65. </EntityType>
  66. <Association Name="FK_Order_Dish">
  67. <End Role="Dish" Type="Self.Dish" Multiplicity="1" />
  68. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  69. <ReferentialConstraint>
  70. <Principal Role="Dish">
  71. <PropertyRef Name="Dish_id" />
  72. </Principal>
  73. <Dependent Role="Order">
  74. <PropertyRef Name="Dish_Id" />
  75. </Dependent>
  76. </ReferentialConstraint>
  77. </Association>
  78. <Association Name="FK_Order_Staff">
  79. <End Role="Staff" Type="Self.Staff" Multiplicity="1" />
  80. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  81. <ReferentialConstraint>
  82. <Principal Role="Staff">
  83. <PropertyRef Name="Staff_id" />
  84. </Principal>
  85. <Dependent Role="Order">
  86. <PropertyRef Name="Staff_Id" />
  87. </Dependent>
  88. </ReferentialConstraint>
  89. </Association>
  90. <Association Name="FK_Order_StatusDish">
  91. <End Role="StatusDish" Type="Self.StatusDish" Multiplicity="1" />
  92. <End Role="Order" Type="Self.Order" Multiplicity="*" />
  93. <ReferentialConstraint>
  94. <Principal Role="StatusDish">
  95. <PropertyRef Name="StatusDish_id" />
  96. </Principal>
  97. <Dependent Role="Order">
  98. <PropertyRef Name="StatusDish_id" />
  99. </Dependent>
  100. </ReferentialConstraint>
  101. </Association>
  102. <Association Name="FK_Staff_Post">
  103. <End Role="Post" Type="Self.Post" Multiplicity="1" />
  104. <End Role="Staff" Type="Self.Staff" Multiplicity="*" />
  105. <ReferentialConstraint>
  106. <Principal Role="Post">
  107. <PropertyRef Name="Post_Id" />
  108. </Principal>
  109. <Dependent Role="Staff">
  110. <PropertyRef Name="Post_id" />
  111. </Dependent>
  112. </ReferentialConstraint>
  113. </Association>
  114. <Association Name="FK_Staff_Status">
  115. <End Role="Status" Type="Self.Status" Multiplicity="1" />
  116. <End Role="Staff" Type="Self.Staff" Multiplicity="*" />
  117. <ReferentialConstraint>
  118. <Principal Role="Status">
  119. <PropertyRef Name="Status_Id" />
  120. </Principal>
  121. <Dependent Role="Staff">
  122. <PropertyRef Name="Status_id" />
  123. </Dependent>
  124. </ReferentialConstraint>
  125. </Association>
  126. <EntityContainer Name="gr691_aasEntities" annotation:LazyLoadingEnabled="true">
  127. <EntitySet Name="Dish" EntityType="Self.Dish" />
  128. <EntitySet Name="Order" EntityType="Self.Order" />
  129. <EntitySet Name="Post" EntityType="Self.Post" />
  130. <EntitySet Name="Staff" EntityType="Self.Staff" />
  131. <EntitySet Name="Status" EntityType="Self.Status" />
  132. <EntitySet Name="StatusDish" EntityType="Self.StatusDish" />
  133. <AssociationSet Name="FK_Order_Dish" Association="Self.FK_Order_Dish">
  134. <End Role="Dish" EntitySet="Dish" />
  135. <End Role="Order" EntitySet="Order" />
  136. </AssociationSet>
  137. <AssociationSet Name="FK_Order_Staff" Association="Self.FK_Order_Staff">
  138. <End Role="Staff" EntitySet="Staff" />
  139. <End Role="Order" EntitySet="Order" />
  140. </AssociationSet>
  141. <AssociationSet Name="FK_Order_StatusDish" Association="Self.FK_Order_StatusDish">
  142. <End Role="StatusDish" EntitySet="StatusDish" />
  143. <End Role="Order" EntitySet="Order" />
  144. </AssociationSet>
  145. <AssociationSet Name="FK_Staff_Post" Association="Self.FK_Staff_Post">
  146. <End Role="Post" EntitySet="Post" />
  147. <End Role="Staff" EntitySet="Staff" />
  148. </AssociationSet>
  149. <AssociationSet Name="FK_Staff_Status" Association="Self.FK_Staff_Status">
  150. <End Role="Status" EntitySet="Status" />
  151. <End Role="Staff" EntitySet="Staff" />
  152. </AssociationSet>
  153. </EntityContainer>
  154. </Schema>