GasStationModel.ssdl 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Schema Namespace="Хранилище gr672_pgvModel" 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="Car">
  4. <Key>
  5. <PropertyRef Name="CarID" />
  6. </Key>
  7. <Property Name="CarID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  8. <Property Name="CarNumber" Type="nvarchar" MaxLength="9" Nullable="false" />
  9. <Property Name="VolumeTank" Type="int" />
  10. <Property Name="IDClient" Type="int" />
  11. </EntityType>
  12. <EntityType Name="Card">
  13. <Key>
  14. <PropertyRef Name="CardID" />
  15. </Key>
  16. <Property Name="CardID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  17. <Property Name="NumberCard" Type="nvarchar" MaxLength="20" Nullable="false" />
  18. <Property Name="CardExpDate" Type="nvarchar" MaxLength="10" Nullable="false" />
  19. <Property Name="Balance" Type="money" Nullable="false" />
  20. <Property Name="IDCardType" Type="int" Nullable="false" />
  21. <Property Name="IDCardIssuer" Type="int" />
  22. <Property Name="IDHolder" Type="int" Nullable="false" />
  23. </EntityType>
  24. <EntityType Name="CardIssuer">
  25. <Key>
  26. <PropertyRef Name="CardIssuerID" />
  27. </Key>
  28. <Property Name="CardIssuerID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  29. <Property Name="NameCardIssuer" Type="nvarchar" MaxLength="50" Nullable="false" />
  30. </EntityType>
  31. <EntityType Name="CardType">
  32. <Key>
  33. <PropertyRef Name="CardTypeID" />
  34. </Key>
  35. <Property Name="CardTypeID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  36. <Property Name="NameType" Type="nvarchar" MaxLength="50" Nullable="false" />
  37. </EntityType>
  38. <EntityType Name="Client">
  39. <Key>
  40. <PropertyRef Name="ClientID" />
  41. </Key>
  42. <Property Name="ClientID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  43. <Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
  44. <Property Name="Name" Type="nvarchar" MaxLength="50" Nullable="false" />
  45. </EntityType>
  46. <EntityType Name="DataOfCamera">
  47. <Key>
  48. <PropertyRef Name="DataOfCameraID" />
  49. </Key>
  50. <Property Name="DataOfCameraID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  51. <Property Name="Date" Type="datetime" Nullable="false" />
  52. <Property Name="Status" Type="bit" Nullable="false" />
  53. <Property Name="CarNumber" Type="nvarchar" MaxLength="9" />
  54. <Property Name="NameImage" Type="nvarchar(max)" Nullable="false" />
  55. </EntityType>
  56. <EntityType Name="FuelType">
  57. <Key>
  58. <PropertyRef Name="FuelTypeID" />
  59. </Key>
  60. <Property Name="FuelTypeID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  61. <Property Name="NameFuelType" Type="nvarchar" MaxLength="2" Nullable="false" />
  62. </EntityType>
  63. <EntityType Name="FuelTypeOnGasStation">
  64. <Key>
  65. <PropertyRef Name="IDGasStation" />
  66. <PropertyRef Name="IDFuelType" />
  67. </Key>
  68. <Property Name="IDGasStation" Type="int" Nullable="false" />
  69. <Property Name="IDFuelType" Type="int" Nullable="false" />
  70. <Property Name="Price" Type="float" Nullable="false" />
  71. <Property Name="AmountOfFuel" Type="int" Nullable="false" />
  72. </EntityType>
  73. <EntityType Name="GasStation">
  74. <Key>
  75. <PropertyRef Name="GasStationID" />
  76. </Key>
  77. <Property Name="GasStationID" Type="int" Nullable="false" />
  78. <Property Name="Address" Type="nvarchar(max)" Nullable="false" />
  79. </EntityType>
  80. <EntityType Name="Payment">
  81. <Key>
  82. <PropertyRef Name="PaymentID" />
  83. </Key>
  84. <Property Name="PaymentID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  85. <Property Name="IDRefueling" Type="int" Nullable="false" />
  86. <Property Name="PriceRefueling" Type="money" Nullable="false" />
  87. <Property Name="Status" Type="bit" Nullable="false" />
  88. <Property Name="TransactionCode" Type="nvarchar" MaxLength="17" Nullable="false" />
  89. <Property Name="IDCard" Type="int" Nullable="false" />
  90. </EntityType>
  91. <EntityType Name="Refueling">
  92. <Key>
  93. <PropertyRef Name="RefuelingID" />
  94. </Key>
  95. <Property Name="RefuelingID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  96. <Property Name="IDCar" Type="int" />
  97. <Property Name="VolumeFuel" Type="int" Nullable="false" />
  98. <Property Name="IDDataOfCamera" Type="int" />
  99. <Property Name="KeySession" Type="nvarchar" MaxLength="12" Nullable="false" />
  100. <Property Name="IDRefulingGun" Type="int" Nullable="false" />
  101. </EntityType>
  102. <EntityType Name="RefuelingColumn">
  103. <Key>
  104. <PropertyRef Name="RefuelingColumnID" />
  105. </Key>
  106. <Property Name="RefuelingColumnID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  107. <Property Name="IDGasStation" Type="int" Nullable="false" />
  108. </EntityType>
  109. <EntityType Name="RefuelingGun">
  110. <Key>
  111. <PropertyRef Name="RefuelingGunID" />
  112. </Key>
  113. <Property Name="RefuelingGunID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
  114. <Property Name="IDRefuelingColumn" Type="int" Nullable="false" />
  115. <Property Name="IDFuelType" Type="int" Nullable="false" />
  116. </EntityType>
  117. <Association Name="FK_Car_Client">
  118. <End Role="Client" Type="Self.Client" Multiplicity="0..1" />
  119. <End Role="Car" Type="Self.Car" Multiplicity="*" />
  120. <ReferentialConstraint>
  121. <Principal Role="Client">
  122. <PropertyRef Name="ClientID" />
  123. </Principal>
  124. <Dependent Role="Car">
  125. <PropertyRef Name="IDClient" />
  126. </Dependent>
  127. </ReferentialConstraint>
  128. </Association>
  129. <Association Name="FK_Card_CardIssuer">
  130. <End Role="CardIssuer" Type="Self.CardIssuer" Multiplicity="0..1" />
  131. <End Role="Card" Type="Self.Card" Multiplicity="*" />
  132. <ReferentialConstraint>
  133. <Principal Role="CardIssuer">
  134. <PropertyRef Name="CardIssuerID" />
  135. </Principal>
  136. <Dependent Role="Card">
  137. <PropertyRef Name="IDCardIssuer" />
  138. </Dependent>
  139. </ReferentialConstraint>
  140. </Association>
  141. <Association Name="FK_Card_CardType">
  142. <End Role="CardType" Type="Self.CardType" Multiplicity="1" />
  143. <End Role="Card" Type="Self.Card" Multiplicity="*" />
  144. <ReferentialConstraint>
  145. <Principal Role="CardType">
  146. <PropertyRef Name="CardTypeID" />
  147. </Principal>
  148. <Dependent Role="Card">
  149. <PropertyRef Name="IDCardType" />
  150. </Dependent>
  151. </ReferentialConstraint>
  152. </Association>
  153. <Association Name="FK_Card_Client">
  154. <End Role="Client" Type="Self.Client" Multiplicity="1" />
  155. <End Role="Card" Type="Self.Card" Multiplicity="*" />
  156. <ReferentialConstraint>
  157. <Principal Role="Client">
  158. <PropertyRef Name="ClientID" />
  159. </Principal>
  160. <Dependent Role="Card">
  161. <PropertyRef Name="IDHolder" />
  162. </Dependent>
  163. </ReferentialConstraint>
  164. </Association>
  165. <Association Name="FK_FuelInGasStation_GasStation">
  166. <End Role="GasStation" Type="Self.GasStation" Multiplicity="1" />
  167. <End Role="FuelTypeOnGasStation" Type="Self.FuelTypeOnGasStation" Multiplicity="*" />
  168. <ReferentialConstraint>
  169. <Principal Role="GasStation">
  170. <PropertyRef Name="GasStationID" />
  171. </Principal>
  172. <Dependent Role="FuelTypeOnGasStation">
  173. <PropertyRef Name="IDGasStation" />
  174. </Dependent>
  175. </ReferentialConstraint>
  176. </Association>
  177. <Association Name="FK_FuelInGasStation_TypeOfFuel">
  178. <End Role="FuelType" Type="Self.FuelType" Multiplicity="1" />
  179. <End Role="FuelTypeOnGasStation" Type="Self.FuelTypeOnGasStation" Multiplicity="*" />
  180. <ReferentialConstraint>
  181. <Principal Role="FuelType">
  182. <PropertyRef Name="FuelTypeID" />
  183. </Principal>
  184. <Dependent Role="FuelTypeOnGasStation">
  185. <PropertyRef Name="IDFuelType" />
  186. </Dependent>
  187. </ReferentialConstraint>
  188. </Association>
  189. <Association Name="FK_Payment_Card">
  190. <End Role="Card" Type="Self.Card" Multiplicity="1" />
  191. <End Role="Payment" Type="Self.Payment" Multiplicity="*" />
  192. <ReferentialConstraint>
  193. <Principal Role="Card">
  194. <PropertyRef Name="CardID" />
  195. </Principal>
  196. <Dependent Role="Payment">
  197. <PropertyRef Name="IDCard" />
  198. </Dependent>
  199. </ReferentialConstraint>
  200. </Association>
  201. <Association Name="FK_Payment_Refueling">
  202. <End Role="Refueling" Type="Self.Refueling" Multiplicity="1" />
  203. <End Role="Payment" Type="Self.Payment" Multiplicity="*" />
  204. <ReferentialConstraint>
  205. <Principal Role="Refueling">
  206. <PropertyRef Name="RefuelingID" />
  207. </Principal>
  208. <Dependent Role="Payment">
  209. <PropertyRef Name="IDRefueling" />
  210. </Dependent>
  211. </ReferentialConstraint>
  212. </Association>
  213. <Association Name="FK_Refueling_Car">
  214. <End Role="Car" Type="Self.Car" Multiplicity="0..1" />
  215. <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
  216. <ReferentialConstraint>
  217. <Principal Role="Car">
  218. <PropertyRef Name="CarID" />
  219. </Principal>
  220. <Dependent Role="Refueling">
  221. <PropertyRef Name="IDCar" />
  222. </Dependent>
  223. </ReferentialConstraint>
  224. </Association>
  225. <Association Name="FK_Refueling_DataOfCamera">
  226. <End Role="DataOfCamera" Type="Self.DataOfCamera" Multiplicity="0..1" />
  227. <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
  228. <ReferentialConstraint>
  229. <Principal Role="DataOfCamera">
  230. <PropertyRef Name="DataOfCameraID" />
  231. </Principal>
  232. <Dependent Role="Refueling">
  233. <PropertyRef Name="IDDataOfCamera" />
  234. </Dependent>
  235. </ReferentialConstraint>
  236. </Association>
  237. <Association Name="FK_Refueling_RefuelingGun">
  238. <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="1" />
  239. <End Role="Refueling" Type="Self.Refueling" Multiplicity="*" />
  240. <ReferentialConstraint>
  241. <Principal Role="RefuelingGun">
  242. <PropertyRef Name="RefuelingGunID" />
  243. </Principal>
  244. <Dependent Role="Refueling">
  245. <PropertyRef Name="IDRefulingGun" />
  246. </Dependent>
  247. </ReferentialConstraint>
  248. </Association>
  249. <Association Name="FK_RefuelingColumn_GasStation">
  250. <End Role="GasStation" Type="Self.GasStation" Multiplicity="1" />
  251. <End Role="RefuelingColumn" Type="Self.RefuelingColumn" Multiplicity="*" />
  252. <ReferentialConstraint>
  253. <Principal Role="GasStation">
  254. <PropertyRef Name="GasStationID" />
  255. </Principal>
  256. <Dependent Role="RefuelingColumn">
  257. <PropertyRef Name="IDGasStation" />
  258. </Dependent>
  259. </ReferentialConstraint>
  260. </Association>
  261. <Association Name="FK_RefuelingGun_FuelType">
  262. <End Role="FuelType" Type="Self.FuelType" Multiplicity="1" />
  263. <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="*" />
  264. <ReferentialConstraint>
  265. <Principal Role="FuelType">
  266. <PropertyRef Name="FuelTypeID" />
  267. </Principal>
  268. <Dependent Role="RefuelingGun">
  269. <PropertyRef Name="IDFuelType" />
  270. </Dependent>
  271. </ReferentialConstraint>
  272. </Association>
  273. <Association Name="FK_RefuelingGun_RefuelingColumn">
  274. <End Role="RefuelingColumn" Type="Self.RefuelingColumn" Multiplicity="1" />
  275. <End Role="RefuelingGun" Type="Self.RefuelingGun" Multiplicity="*" />
  276. <ReferentialConstraint>
  277. <Principal Role="RefuelingColumn">
  278. <PropertyRef Name="RefuelingColumnID" />
  279. </Principal>
  280. <Dependent Role="RefuelingGun">
  281. <PropertyRef Name="IDRefuelingColumn" />
  282. </Dependent>
  283. </ReferentialConstraint>
  284. </Association>
  285. <EntityContainer Name="Хранилище gr672_pgvModelContainer">
  286. <EntitySet Name="Car" EntityType="Self.Car" Schema="dbo" store:Type="Tables" />
  287. <EntitySet Name="Card" EntityType="Self.Card" Schema="dbo" store:Type="Tables" />
  288. <EntitySet Name="CardIssuer" EntityType="Self.CardIssuer" Schema="dbo" store:Type="Tables" />
  289. <EntitySet Name="CardType" EntityType="Self.CardType" Schema="dbo" store:Type="Tables" />
  290. <EntitySet Name="Client" EntityType="Self.Client" Schema="dbo" store:Type="Tables" />
  291. <EntitySet Name="DataOfCamera" EntityType="Self.DataOfCamera" Schema="dbo" store:Type="Tables" />
  292. <EntitySet Name="FuelType" EntityType="Self.FuelType" Schema="dbo" store:Type="Tables" />
  293. <EntitySet Name="FuelTypeOnGasStation" EntityType="Self.FuelTypeOnGasStation" Schema="dbo" store:Type="Tables" />
  294. <EntitySet Name="GasStation" EntityType="Self.GasStation" Schema="dbo" store:Type="Tables" />
  295. <EntitySet Name="Payment" EntityType="Self.Payment" Schema="dbo" store:Type="Tables" />
  296. <EntitySet Name="Refueling" EntityType="Self.Refueling" Schema="dbo" store:Type="Tables" />
  297. <EntitySet Name="RefuelingColumn" EntityType="Self.RefuelingColumn" Schema="dbo" store:Type="Tables" />
  298. <EntitySet Name="RefuelingGun" EntityType="Self.RefuelingGun" Schema="dbo" store:Type="Tables" />
  299. <AssociationSet Name="FK_Car_Client" Association="Self.FK_Car_Client">
  300. <End Role="Client" EntitySet="Client" />
  301. <End Role="Car" EntitySet="Car" />
  302. </AssociationSet>
  303. <AssociationSet Name="FK_Card_CardIssuer" Association="Self.FK_Card_CardIssuer">
  304. <End Role="CardIssuer" EntitySet="CardIssuer" />
  305. <End Role="Card" EntitySet="Card" />
  306. </AssociationSet>
  307. <AssociationSet Name="FK_Card_CardType" Association="Self.FK_Card_CardType">
  308. <End Role="CardType" EntitySet="CardType" />
  309. <End Role="Card" EntitySet="Card" />
  310. </AssociationSet>
  311. <AssociationSet Name="FK_Card_Client" Association="Self.FK_Card_Client">
  312. <End Role="Client" EntitySet="Client" />
  313. <End Role="Card" EntitySet="Card" />
  314. </AssociationSet>
  315. <AssociationSet Name="FK_FuelInGasStation_GasStation" Association="Self.FK_FuelInGasStation_GasStation">
  316. <End Role="GasStation" EntitySet="GasStation" />
  317. <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
  318. </AssociationSet>
  319. <AssociationSet Name="FK_FuelInGasStation_TypeOfFuel" Association="Self.FK_FuelInGasStation_TypeOfFuel">
  320. <End Role="FuelType" EntitySet="FuelType" />
  321. <End Role="FuelTypeOnGasStation" EntitySet="FuelTypeOnGasStation" />
  322. </AssociationSet>
  323. <AssociationSet Name="FK_Payment_Card" Association="Self.FK_Payment_Card">
  324. <End Role="Card" EntitySet="Card" />
  325. <End Role="Payment" EntitySet="Payment" />
  326. </AssociationSet>
  327. <AssociationSet Name="FK_Payment_Refueling" Association="Self.FK_Payment_Refueling">
  328. <End Role="Refueling" EntitySet="Refueling" />
  329. <End Role="Payment" EntitySet="Payment" />
  330. </AssociationSet>
  331. <AssociationSet Name="FK_Refueling_Car" Association="Self.FK_Refueling_Car">
  332. <End Role="Car" EntitySet="Car" />
  333. <End Role="Refueling" EntitySet="Refueling" />
  334. </AssociationSet>
  335. <AssociationSet Name="FK_Refueling_DataOfCamera" Association="Self.FK_Refueling_DataOfCamera">
  336. <End Role="DataOfCamera" EntitySet="DataOfCamera" />
  337. <End Role="Refueling" EntitySet="Refueling" />
  338. </AssociationSet>
  339. <AssociationSet Name="FK_Refueling_RefuelingGun" Association="Self.FK_Refueling_RefuelingGun">
  340. <End Role="RefuelingGun" EntitySet="RefuelingGun" />
  341. <End Role="Refueling" EntitySet="Refueling" />
  342. </AssociationSet>
  343. <AssociationSet Name="FK_RefuelingColumn_GasStation" Association="Self.FK_RefuelingColumn_GasStation">
  344. <End Role="GasStation" EntitySet="GasStation" />
  345. <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
  346. </AssociationSet>
  347. <AssociationSet Name="FK_RefuelingGun_FuelType" Association="Self.FK_RefuelingGun_FuelType">
  348. <End Role="FuelType" EntitySet="FuelType" />
  349. <End Role="RefuelingGun" EntitySet="RefuelingGun" />
  350. </AssociationSet>
  351. <AssociationSet Name="FK_RefuelingGun_RefuelingColumn" Association="Self.FK_RefuelingGun_RefuelingColumn">
  352. <End Role="RefuelingColumn" EntitySet="RefuelingColumn" />
  353. <End Role="RefuelingGun" EntitySet="RefuelingGun" />
  354. </AssociationSet>
  355. </EntityContainer>
  356. </Schema>