Model1.ssdl 14 KB

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