Model1.csdl 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="mateoModel" 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="Attraction">
  4. <Key>
  5. <PropertyRef Name="IDAttraction" />
  6. </Key>
  7. <Property Name="IDAttraction" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  8. <Property Name="NameAttraction" Type="String" MaxLength="100" FixedLength="false" Unicode="true" Nullable="false" />
  9. <Property Name="Description" Type="String" MaxLength="400" FixedLength="false" Unicode="true" />
  10. <Property Name="PriceOld" Type="Decimal" Precision="19" Scale="4" />
  11. <Property Name="PriceBaby" Type="Decimal" Precision="19" Scale="4" />
  12. <Property Name="QuantityAttraction" Type="Int32" Nullable="false" />
  13. <Property Name="ImageAttraction" Type="Binary" MaxLength="Max" FixedLength="false" Nullable="false" />
  14. <Property Name="FKEmployees" Type="Int32" Nullable="false" />
  15. <Property Name="FKStatusAttraction" Type="Int32" Nullable="false" />
  16. <Property Name="FKType" Type="Int32" Nullable="false" />
  17. <NavigationProperty Name="Employees" Relationship="Self.FK_Attraction_Employees" FromRole="Attraction" ToRole="Employees" />
  18. <NavigationProperty Name="StatusAttraction" Relationship="Self.FK_Attraction_StatusAttraction" FromRole="Attraction" ToRole="StatusAttraction" />
  19. <NavigationProperty Name="Type" Relationship="Self.FK_Attraction_Type" FromRole="Attraction" ToRole="Type" />
  20. <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_Attraction" FromRole="Attraction" ToRole="Tickets" />
  21. </EntityType>
  22. <EntityType Name="Card">
  23. <Key>
  24. <PropertyRef Name="IDCard" />
  25. </Key>
  26. <Property Name="IDCard" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  27. <Property Name="NumberCard" Type="String" MaxLength="19" FixedLength="false" Unicode="true" Nullable="false" />
  28. <Property Name="Balance" Type="Decimal" Precision="19" Scale="4" />
  29. <NavigationProperty Name="Users" Relationship="Self.FK_Users_Card" FromRole="Card" ToRole="Users" />
  30. </EntityType>
  31. <EntityType Name="Employees">
  32. <Key>
  33. <PropertyRef Name="IDEmployees" />
  34. </Key>
  35. <Property Name="IDEmployees" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  36. <Property Name="LastName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
  37. <Property Name="FirstName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
  38. <Property Name="MiddleName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" />
  39. <Property Name="Login" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  40. <Property Name="Password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  41. <Property Name="FKRole" Type="Int32" Nullable="false" />
  42. <Property Name="FKStatusEmployees" Type="Int32" Nullable="false" />
  43. <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_Employees" FromRole="Employees" ToRole="Attraction" />
  44. <NavigationProperty Name="Role" Relationship="Self.FK_Employees_Role" FromRole="Employees" ToRole="Role" />
  45. <NavigationProperty Name="StatusEmployees" Relationship="Self.FK_Employees_StatusEmployees" FromRole="Employees" ToRole="StatusEmployees" />
  46. </EntityType>
  47. <EntityType Name="History">
  48. <Key>
  49. <PropertyRef Name="IDHistory" />
  50. </Key>
  51. <Property Name="IDHistory" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  52. <Property Name="FKUser" Type="Int32" Nullable="false" />
  53. <Property Name="DateTime" Type="DateTime" Nullable="false" Precision="3" />
  54. <Property Name="Summ" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  55. <NavigationProperty Name="Users" Relationship="Self.FK_History_Users" FromRole="History" ToRole="Users" />
  56. </EntityType>
  57. <EntityType Name="Role">
  58. <Key>
  59. <PropertyRef Name="IDRole" />
  60. </Key>
  61. <Property Name="IDRole" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  62. <Property Name="Role1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
  63. <NavigationProperty Name="Employees" Relationship="Self.FK_Employees_Role" FromRole="Role" ToRole="Employees" />
  64. </EntityType>
  65. <EntityType Name="StatusAttraction">
  66. <Key>
  67. <PropertyRef Name="IDStatusAttraction" />
  68. </Key>
  69. <Property Name="IDStatusAttraction" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  70. <Property Name="StatusAttraction1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
  71. <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_StatusAttraction" FromRole="StatusAttraction" ToRole="Attraction" />
  72. </EntityType>
  73. <EntityType Name="StatusEmployees">
  74. <Key>
  75. <PropertyRef Name="IDStatusEmployees" />
  76. </Key>
  77. <Property Name="IDStatusEmployees" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  78. <Property Name="StatusEmployees1" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
  79. <NavigationProperty Name="Employees" Relationship="Self.FK_Employees_StatusEmployees" FromRole="StatusEmployees" ToRole="Employees" />
  80. </EntityType>
  81. <EntityType Name="StatusPay">
  82. <Key>
  83. <PropertyRef Name="IDStatusPay" />
  84. </Key>
  85. <Property Name="IDStatusPay" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  86. <Property Name="StatusPay1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  87. <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_StatusPay" FromRole="StatusPay" ToRole="Tickets" />
  88. </EntityType>
  89. <EntityType Name="sysdiagrams">
  90. <Key>
  91. <PropertyRef Name="diagram_id" />
  92. </Key>
  93. <Property Name="name" Type="String" MaxLength="128" FixedLength="false" Unicode="true" Nullable="false" />
  94. <Property Name="principal_id" Type="Int32" Nullable="false" />
  95. <Property Name="diagram_id" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  96. <Property Name="version" Type="Int32" />
  97. <Property Name="definition" Type="Binary" MaxLength="Max" FixedLength="false" />
  98. </EntityType>
  99. <EntityType Name="Tickets">
  100. <Key>
  101. <PropertyRef Name="IDTickets" />
  102. </Key>
  103. <Property Name="IDTickets" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  104. <Property Name="FKUser" Type="Int32" Nullable="false" />
  105. <Property Name="FKAttraction" Type="Int32" Nullable="false" />
  106. <Property Name="FKTypeTickets" Type="Int32" Nullable="false" />
  107. <Property Name="FKStatusPuy" Type="Int32" Nullable="false" />
  108. <Property Name="Quantity" Type="Int32" Nullable="false" />
  109. <Property Name="Summ" Type="Decimal" Precision="19" Scale="4" Nullable="false" />
  110. <Property Name="Date" Type="DateTime" Nullable="false" Precision="0" />
  111. <NavigationProperty Name="Attraction" Relationship="Self.FK_Tickets_Attraction" FromRole="Tickets" ToRole="Attraction" />
  112. <NavigationProperty Name="StatusPay" Relationship="Self.FK_Tickets_StatusPay" FromRole="Tickets" ToRole="StatusPay" />
  113. <NavigationProperty Name="TypeTickets" Relationship="Self.FK_Tickets_TypeTickets" FromRole="Tickets" ToRole="TypeTickets" />
  114. <NavigationProperty Name="Users" Relationship="Self.FK_Tickets_Users" FromRole="Tickets" ToRole="Users" />
  115. </EntityType>
  116. <EntityType Name="Type">
  117. <Key>
  118. <PropertyRef Name="IDType" />
  119. </Key>
  120. <Property Name="IDType" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  121. <Property Name="Type1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  122. <NavigationProperty Name="Attraction" Relationship="Self.FK_Attraction_Type" FromRole="Type" ToRole="Attraction" />
  123. </EntityType>
  124. <EntityType Name="TypeTickets">
  125. <Key>
  126. <PropertyRef Name="IDTypeTickets" />
  127. </Key>
  128. <Property Name="IDTypeTickets" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  129. <Property Name="TypeTickets1" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  130. <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_TypeTickets" FromRole="TypeTickets" ToRole="Tickets" />
  131. </EntityType>
  132. <EntityType Name="Users">
  133. <Key>
  134. <PropertyRef Name="IDUsers" />
  135. </Key>
  136. <Property Name="IDUsers" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
  137. <Property Name="LastName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
  138. <Property Name="FirstName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" Nullable="false" />
  139. <Property Name="MiddleName" Type="String" MaxLength="25" FixedLength="false" Unicode="true" />
  140. <Property Name="Image" Type="Binary" MaxLength="Max" FixedLength="false" />
  141. <Property Name="Login" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  142. <Property Name="Password" Type="String" MaxLength="20" FixedLength="false" Unicode="true" Nullable="false" />
  143. <Property Name="FKCard" Type="Int32" Nullable="false" />
  144. <NavigationProperty Name="Card" Relationship="Self.FK_Users_Card" FromRole="Users" ToRole="Card" />
  145. <NavigationProperty Name="History" Relationship="Self.FK_History_Users" FromRole="Users" ToRole="History" />
  146. <NavigationProperty Name="Tickets" Relationship="Self.FK_Tickets_Users" FromRole="Users" ToRole="Tickets" />
  147. </EntityType>
  148. <Association Name="FK_Attraction_Employees">
  149. <End Role="Employees" Type="Self.Employees" Multiplicity="1" />
  150. <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
  151. <ReferentialConstraint>
  152. <Principal Role="Employees">
  153. <PropertyRef Name="IDEmployees" />
  154. </Principal>
  155. <Dependent Role="Attraction">
  156. <PropertyRef Name="FKEmployees" />
  157. </Dependent>
  158. </ReferentialConstraint>
  159. </Association>
  160. <Association Name="FK_Attraction_StatusAttraction">
  161. <End Role="StatusAttraction" Type="Self.StatusAttraction" Multiplicity="1" />
  162. <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
  163. <ReferentialConstraint>
  164. <Principal Role="StatusAttraction">
  165. <PropertyRef Name="IDStatusAttraction" />
  166. </Principal>
  167. <Dependent Role="Attraction">
  168. <PropertyRef Name="FKStatusAttraction" />
  169. </Dependent>
  170. </ReferentialConstraint>
  171. </Association>
  172. <Association Name="FK_Attraction_Type">
  173. <End Role="Type" Type="Self.Type" Multiplicity="1" />
  174. <End Role="Attraction" Type="Self.Attraction" Multiplicity="*" />
  175. <ReferentialConstraint>
  176. <Principal Role="Type">
  177. <PropertyRef Name="IDType" />
  178. </Principal>
  179. <Dependent Role="Attraction">
  180. <PropertyRef Name="FKType" />
  181. </Dependent>
  182. </ReferentialConstraint>
  183. </Association>
  184. <Association Name="FK_Tickets_Attraction">
  185. <End Role="Attraction" Type="Self.Attraction" Multiplicity="1" />
  186. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  187. <ReferentialConstraint>
  188. <Principal Role="Attraction">
  189. <PropertyRef Name="IDAttraction" />
  190. </Principal>
  191. <Dependent Role="Tickets">
  192. <PropertyRef Name="FKAttraction" />
  193. </Dependent>
  194. </ReferentialConstraint>
  195. </Association>
  196. <Association Name="FK_Users_Card">
  197. <End Role="Card" Type="Self.Card" Multiplicity="1" />
  198. <End Role="Users" Type="Self.Users" Multiplicity="*" />
  199. <ReferentialConstraint>
  200. <Principal Role="Card">
  201. <PropertyRef Name="IDCard" />
  202. </Principal>
  203. <Dependent Role="Users">
  204. <PropertyRef Name="FKCard" />
  205. </Dependent>
  206. </ReferentialConstraint>
  207. </Association>
  208. <Association Name="FK_Employees_Role">
  209. <End Role="Role" Type="Self.Role" Multiplicity="1" />
  210. <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
  211. <ReferentialConstraint>
  212. <Principal Role="Role">
  213. <PropertyRef Name="IDRole" />
  214. </Principal>
  215. <Dependent Role="Employees">
  216. <PropertyRef Name="FKRole" />
  217. </Dependent>
  218. </ReferentialConstraint>
  219. </Association>
  220. <Association Name="FK_Employees_StatusEmployees">
  221. <End Role="StatusEmployees" Type="Self.StatusEmployees" Multiplicity="1" />
  222. <End Role="Employees" Type="Self.Employees" Multiplicity="*" />
  223. <ReferentialConstraint>
  224. <Principal Role="StatusEmployees">
  225. <PropertyRef Name="IDStatusEmployees" />
  226. </Principal>
  227. <Dependent Role="Employees">
  228. <PropertyRef Name="FKStatusEmployees" />
  229. </Dependent>
  230. </ReferentialConstraint>
  231. </Association>
  232. <Association Name="FK_History_Users">
  233. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  234. <End Role="History" Type="Self.History" Multiplicity="*" />
  235. <ReferentialConstraint>
  236. <Principal Role="Users">
  237. <PropertyRef Name="IDUsers" />
  238. </Principal>
  239. <Dependent Role="History">
  240. <PropertyRef Name="FKUser" />
  241. </Dependent>
  242. </ReferentialConstraint>
  243. </Association>
  244. <Association Name="FK_Tickets_StatusPay">
  245. <End Role="StatusPay" Type="Self.StatusPay" Multiplicity="1" />
  246. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  247. <ReferentialConstraint>
  248. <Principal Role="StatusPay">
  249. <PropertyRef Name="IDStatusPay" />
  250. </Principal>
  251. <Dependent Role="Tickets">
  252. <PropertyRef Name="FKStatusPuy" />
  253. </Dependent>
  254. </ReferentialConstraint>
  255. </Association>
  256. <Association Name="FK_Tickets_TypeTickets">
  257. <End Role="TypeTickets" Type="Self.TypeTickets" Multiplicity="1" />
  258. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  259. <ReferentialConstraint>
  260. <Principal Role="TypeTickets">
  261. <PropertyRef Name="IDTypeTickets" />
  262. </Principal>
  263. <Dependent Role="Tickets">
  264. <PropertyRef Name="FKTypeTickets" />
  265. </Dependent>
  266. </ReferentialConstraint>
  267. </Association>
  268. <Association Name="FK_Tickets_Users">
  269. <End Role="Users" Type="Self.Users" Multiplicity="1" />
  270. <End Role="Tickets" Type="Self.Tickets" Multiplicity="*" />
  271. <ReferentialConstraint>
  272. <Principal Role="Users">
  273. <PropertyRef Name="IDUsers" />
  274. </Principal>
  275. <Dependent Role="Tickets">
  276. <PropertyRef Name="FKUser" />
  277. </Dependent>
  278. </ReferentialConstraint>
  279. </Association>
  280. <EntityContainer Name="mateoEntities" annotation:LazyLoadingEnabled="true">
  281. <EntitySet Name="Attraction" EntityType="Self.Attraction" />
  282. <EntitySet Name="Card" EntityType="Self.Card" />
  283. <EntitySet Name="Employees" EntityType="Self.Employees" />
  284. <EntitySet Name="History" EntityType="Self.History" />
  285. <EntitySet Name="Role" EntityType="Self.Role" />
  286. <EntitySet Name="StatusAttraction" EntityType="Self.StatusAttraction" />
  287. <EntitySet Name="StatusEmployees" EntityType="Self.StatusEmployees" />
  288. <EntitySet Name="StatusPay" EntityType="Self.StatusPay" />
  289. <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" />
  290. <EntitySet Name="Tickets" EntityType="Self.Tickets" />
  291. <EntitySet Name="Type" EntityType="Self.Type" />
  292. <EntitySet Name="TypeTickets" EntityType="Self.TypeTickets" />
  293. <EntitySet Name="Users" EntityType="Self.Users" />
  294. <AssociationSet Name="FK_Attraction_Employees" Association="Self.FK_Attraction_Employees">
  295. <End Role="Employees" EntitySet="Employees" />
  296. <End Role="Attraction" EntitySet="Attraction" />
  297. </AssociationSet>
  298. <AssociationSet Name="FK_Attraction_StatusAttraction" Association="Self.FK_Attraction_StatusAttraction">
  299. <End Role="StatusAttraction" EntitySet="StatusAttraction" />
  300. <End Role="Attraction" EntitySet="Attraction" />
  301. </AssociationSet>
  302. <AssociationSet Name="FK_Attraction_Type" Association="Self.FK_Attraction_Type">
  303. <End Role="Type" EntitySet="Type" />
  304. <End Role="Attraction" EntitySet="Attraction" />
  305. </AssociationSet>
  306. <AssociationSet Name="FK_Tickets_Attraction" Association="Self.FK_Tickets_Attraction">
  307. <End Role="Attraction" EntitySet="Attraction" />
  308. <End Role="Tickets" EntitySet="Tickets" />
  309. </AssociationSet>
  310. <AssociationSet Name="FK_Users_Card" Association="Self.FK_Users_Card">
  311. <End Role="Card" EntitySet="Card" />
  312. <End Role="Users" EntitySet="Users" />
  313. </AssociationSet>
  314. <AssociationSet Name="FK_Employees_Role" Association="Self.FK_Employees_Role">
  315. <End Role="Role" EntitySet="Role" />
  316. <End Role="Employees" EntitySet="Employees" />
  317. </AssociationSet>
  318. <AssociationSet Name="FK_Employees_StatusEmployees" Association="Self.FK_Employees_StatusEmployees">
  319. <End Role="StatusEmployees" EntitySet="StatusEmployees" />
  320. <End Role="Employees" EntitySet="Employees" />
  321. </AssociationSet>
  322. <AssociationSet Name="FK_History_Users" Association="Self.FK_History_Users">
  323. <End Role="Users" EntitySet="Users" />
  324. <End Role="History" EntitySet="History" />
  325. </AssociationSet>
  326. <AssociationSet Name="FK_Tickets_StatusPay" Association="Self.FK_Tickets_StatusPay">
  327. <End Role="StatusPay" EntitySet="StatusPay" />
  328. <End Role="Tickets" EntitySet="Tickets" />
  329. </AssociationSet>
  330. <AssociationSet Name="FK_Tickets_TypeTickets" Association="Self.FK_Tickets_TypeTickets">
  331. <End Role="TypeTickets" EntitySet="TypeTickets" />
  332. <End Role="Tickets" EntitySet="Tickets" />
  333. </AssociationSet>
  334. <AssociationSet Name="FK_Tickets_Users" Association="Self.FK_Tickets_Users">
  335. <End Role="Users" EntitySet="Users" />
  336. <End Role="Tickets" EntitySet="Tickets" />
  337. </AssociationSet>
  338. </EntityContainer>
  339. </Schema>