From 14c4630b6f8ef50c7af672e3a1da7971a1456581 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 28 Jun 2020 23:32:50 +0200 Subject: [PATCH] change project structure --- db.mv.db | Bin 1388544 -> 1384448 bytes diagrams/entities/entities.plantuml | 100 ---------------- diagrams/entities/entities.svg | 111 +++++++++--------- diagrams/entities/entities.txt | 83 +++++++++++++ ...ection_Route_and_ConnectionRoute_table.sql | 1 - 5 files changed, 140 insertions(+), 155 deletions(-) delete mode 100644 diagrams/entities/entities.plantuml create mode 100644 diagrams/entities/entities.txt diff --git a/db.mv.db b/db.mv.db index ba83a793c637d00b4d1edefc759d37195a38e28d..866d9feaa6acfb9b294e5dc1c1503059c17a34d0 100644 GIT binary patch delta 16825 zcmeHPZEPIH8NS`vNqlkcY~NfOOo2^+P>eyhpSNeV@kM-vltQSWDM+Qc+ubV=YUAKQ z)jxLo<5W?#B|-3_mXaXy)vA=51l)>BI7+CYqLB0hQb5QSrKJ=Ifi|fsMElNu+|1Z_ zNu1a&B(`MD&iZa{Z)Wy+p7(j*b^pk<{X^HzU*4g$7jNx$)^w<5X8rtylDmG%`Dr)T zUb@xmb#C(3b`&$J;kcR+AL#i(a((~&4NZ;GvAy!!N?DQ0idXCG?$f@vXXj2A#)YkaUq^3XQWGZrv0|U*Sy<1 z%=We2-Mt;Us_U@mF_LOFZQIq_@9@^%esgzMhhsRfdNnCYhhca%`A^@MVhJgxYW=a; zKko8d=~F9$_TsSZ4$nUj56(Xmw*S1!@5?KG8?<+>2-?kIyZ8Hkf7ZEo#Z)~Xi~VxH z-^v>|`0cC<@0KJ9@??<~HkIjq4otxHmt+@!VP-TZ2J2cs$#SXLV&}N4@c35DC zMRw>k1fS-XyzTJe>!d+;R2cXRxe)r#Nw>D?86$%~hGu0-?Y%dD-Rmf2b4J$I)b@2< z>u&d4+BdbVSAxQ&B$ae*euh=JyO*RJoyx{BEEwn|XVbCg!aMs(O4c(lI!sc;aBVBc zk7?UFi~=D^C&v$|LE(mZs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pF?SJ7J9*Y-+>TvHebm6(0y*sDqHl(T& z4=QfHs2ts_WL6V(*?aPb36HpPT};V&$btPV1AB+Ilw|>}n}21y4Xk3CdQ(mK?G1@Xj^9x>G60#~`S3`^QQa(|tQ3_}P2# zm@C-L@y2$Ppu0IBzA85Jpf=1ujv-EFqGLdPGqSJ@GDgJak;Hi(5pCT`5hD6W{|peZ z#!p1pJ^{~53K}XFmjh!-wP@CG+;a}P-khlczn?dvEFJgmMRq!_N8XBV7}w~tpxh_; QX9s3gMU!yX_DJjh0rCClUH||9 diff --git a/diagrams/entities/entities.plantuml b/diagrams/entities/entities.plantuml deleted file mode 100644 index 5516e89..0000000 --- a/diagrams/entities/entities.plantuml +++ /dev/null @@ -1,100 +0,0 @@ -@startuml entities - -class Airport { - __ attributes __ - - id: Long - - airportName: String - - city: String - - country: String - - longitude: double - - latitude: double - - timezone: int -} - -class Airline { - __ attributes __ - - id: Long - - name: String - - country: String - - price: double - // more properties, like calculator, restriction etc. -} - -class Route { - __ attributes __ - - routeId: Long - - srcAirportId: Long - - dstAirportId: Long - - connections: Array -} - -class Connection { - __ attributes __ -<<<<<<< HEAD - - connectionId: int - - airline: String - - srcAirport: String - - dstAirport: String - - departureDate: Date - - arrivalDate: Date -======= - - connectionId: Long - - airlineId: Long - - srcAirportId: Long - - dstAirportId: Long ->>>>>>> 7e004466981416afe071e0209bf859e41c7e3e9d -} - -class Flight { - __ attributes __ - - flightId: Long - - connection: Connection - - peopleCapacity: int - - departureDate: Date - - arrivalDate: Date -} - -class Ticket { - __ attributes __ - - ticketId: Long - - flight: Flight - - passenger: Passenger - - purchaseDate: Date - - flightClass: String - - seatNumber: int - - maxLuggageWeight: double - - price: Price - // maybe more parameters -} - -class Passenger { - __ attributes __ - -firstname: String - -surname: String - -dateOfBirth: Date - -phoneNumber: String - -email: String - -idOrPesel: String -} - -class Trip { - __ attributes __ - - id: Long - - oneWayTrip: boolean - - tickets: Array - - departureDate: Date - - arrivalDate: Date - - totalPrice: Price -} - -Route --.> Airport -Route --.> Airline -Route o-- Connection -Connection --.> Airline -Connection --.> Airport -Flight o-- Connection -Ticket o-- Flight -Ticket *-- Passenger -Trip *-- Ticket - -@enduml diff --git a/diagrams/entities/entities.svg b/diagrams/entities/entities.svg index 2cbdeae..6b6a1bd 100644 --- a/diagrams/entities/entities.svg +++ b/diagrams/entities/entities.svg @@ -1,105 +1,108 @@ -Airportid: intiata: Stringicao: StringairportName: Stringcity: Stringcountry: Stringcoordinates: Pointtimezone: intattributesAirlineid: intiata: Stringicao: Stringname: String// more properties, like calculator, restriction etc.attributesRouterouteId: intsrcAirportCode: StringdstAirportCode: Stringconnections: Array<Connection>attributesConnectionconnectionId: intairline: StringsrcAirport: StringdstAirport: StringattributesFlightflightId: intconnection: ConnectionpeopleCapacity: intdepartureDate: DatearrivalDate: DateattributesTicketticketId: intflight: Flightpassenger: PassengerpurchaseDate: DateflightClass: StringseatNumber: intmaxLuggageWeight: doubleprice: Price// maybe more parametersattributesPassengerfirstname: Stringsurname: StringdateOfBirth: DatephoneNumber: Stringemail: StringidOrPesel: StringattributesTripid: intoneWayTrip: booleantickets: Array<Ticket>departureDate: DatearrivalDate: DatetotalPrice: PriceattributesAirportid: Longname: Stringcity: Stringcountry: Stringlongitude: doublelatitude: doubletimezone: intattributesAirlineid: Longname: Stringcountry: StringattributesConnectionid: LongsrcAirport: AirportdstAirport: AirportdepartureDate: LocalDateTimearrivalDate: LocalDateTimeattributesFlightid: Longconnection: Connectionairline: AirlinenumberSeats: intprice: doubleattributesTicketid: Longpassenger: PassengerpurchaseDate: LocalDateTimeseatNumber: intprice: doubleconnections: Array<Flight>//luggage weight, flightClassattributesPassengerfirstname: Stringsurname: StringdateOfBirth: LocalDatephoneNumber: Stringemail: Stringpesel: StringattributesTripid: LongoneWayTrip: booleantickets: Array<Ticket>departureDate: LocalDateTimearrivalDate: LocalDateTimetotalPrice: Price//one way tripattributesAvaiableTripsid: LongavaiableTrips: Array<Trip>attributes \ No newline at end of file diff --git a/diagrams/entities/entities.txt b/diagrams/entities/entities.txt new file mode 100644 index 0000000..2ab605a --- /dev/null +++ b/diagrams/entities/entities.txt @@ -0,0 +1,83 @@ +@startuml +class Airport { + __ attributes __ + - id: Long + - name: String + - city: String + - country: String + - longitude: double + - latitude: double + - timezone: int +} + +class Airline { + __ attributes __ + - id: Long + - name: String + - country: String +} + +class Connection { + __ attributes __ + - id: Long + - srcAirport: Airport + - dstAirport: Airport + - departureDate: LocalDateTime + - arrivalDate: LocalDateTime +} + +class Flight { + __ attributes __ + - id: Long + - connection: Connection + - airline: Airline + - numberSeats: int + - price: double +} + +class Ticket { + __ attributes __ + - id: Long + - passenger: Passenger + - purchaseDate: LocalDateTime + - seatNumber: int + - price: double + - connections: Array + //luggage weight, flightClass +} + +class Passenger { + __ attributes __ + -firstname: String + -surname: String + -dateOfBirth: LocalDate + -phoneNumber: String + -email: String + -pesel: String +} + +class Trip { + __ attributes __ + - id: Long + - oneWayTrip: boolean + - tickets: Array + - departureDate: LocalDateTime + - arrivalDate: LocalDateTime + - totalPrice: Price + //one way trip +} + +class AvaiableTrips { + __ attributes __ + - id: Long + - avaiableTrips: Array +} + +Connection --.> Airline +Connection --.> Airport +Flight *-- Connection +Ticket o-- Passenger +Ticket o-- Flight +Trip *-- Ticket +AvaiableTrips o-- Trip +@enduml \ No newline at end of file diff --git a/src/main/resources/db/migration/V2__init_Connection_Route_and_ConnectionRoute_table.sql b/src/main/resources/db/migration/V2__init_Connection_Route_and_ConnectionRoute_table.sql index b6c1f6b..bae8a3e 100644 --- a/src/main/resources/db/migration/V2__init_Connection_Route_and_ConnectionRoute_table.sql +++ b/src/main/resources/db/migration/V2__init_Connection_Route_and_ConnectionRoute_table.sql @@ -6,7 +6,6 @@ create table connections( connection_id bigint auto_increment , airport_src_id bigint not null, airport_dst_id bigint not null, - airline_id bigint not null, number_seats int not null, departure_date date not null, arrival_date date not null,