Skip to content

Commit

Permalink
change project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
wydra98 committed Jun 28, 2020
1 parent fbe8121 commit 14c4630
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 155 deletions.
Binary file modified db.mv.db
Binary file not shown.
100 changes: 0 additions & 100 deletions diagrams/entities/entities.plantuml

This file was deleted.

111 changes: 57 additions & 54 deletions diagrams/entities/entities.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions diagrams/entities/entities.txt
Original file line number Diff line number Diff line change
@@ -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<Flight>
//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<Ticket>
- departureDate: LocalDateTime
- arrivalDate: LocalDateTime
- totalPrice: Price
//one way trip
}

class AvaiableTrips {
__ attributes __
- id: Long
- avaiableTrips: Array<Trip>
}

Connection --.> Airline
Connection --.> Airport
Flight *-- Connection
Ticket o-- Passenger
Ticket o-- Flight
Trip *-- Ticket
AvaiableTrips o-- Trip
@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 14c4630

Please sign in to comment.