Untitled

 avatar
unknown
plain_text
a month ago
2.2 kB
1
Indexable
@startuml
!include <CSharpskin>

class User {
  - UserID : int <<primaryKey>>
  - Username : string
  - Password : string
  - FirstName : string
  - LastName : string
  - Email : string
  - ContactNumber : string
  - UserType : string 

  + Login() : bool
  + Logout() : void
  + ViewProfile() : void
  + EditProfile() : void
}

class Customer extends User {
  + SearchFlights() : List<Flight>
  + SelectSeat(flight : Flight) : void
  + MakeBooking(flight : Flight, schedule : Schedule, seat : Seat) : Booking
  + ViewBookings() : List<Booking>
  + CancelBooking(booking : Booking) : void
  + MakePayment(booking : Booking) : void
}

class Admin extends User {
  + AddFlight(flight : Flight) : void
  + UpdateFlight(flight : Flight) : void
  + DeleteFlight(flight : Flight) : void
  + ManageSchedules(flight : Flight) : void
  + ViewUsers() : List<User>
  + ViewBookings() : List<Booking>
}

class Flight {
  - FlightNumber : string <<primaryKey>>
  - Airline : string
  - Origin : string
  - Destination : string
  - DepartureTime : datetime
  - ArrivalTime : datetime
  - AircraftType : string
  - Status : string

  + GetFlightDetails() : string
  + UpdateStatus(status : string) : void
}

class Schedule {
  - ScheduleID : int <<primaryKey>>
  - FlightNumber : string
  - DepartureDate : date
  - ArrivalDate : date
  - Price : decimal

  + GetScheduleDetails() : string
}

class Seat {
  - SeatID : int <<primaryKey>>
  - FlightNumber : string
  - SeatNumber : string
  - Class : string
  - Availability : bool

  + ReserveSeat() : void
  + ReleaseSeat() : void
}

class Booking {
  - BookingID : int <<primaryKey>>
  - UserID : int
  - FlightNumber : string
  - ScheduleID : int
  - SeatID : int
  - BookingDate : datetime
  - TotalPrice : decimal
  - PaymentStatus : string

  + ConfirmBooking() : void
  + CancelBooking() : void
  + GenerateEticket() : void
}

class Payment {
  - PaymentID : int <<primaryKey>>
  - BookingID : int
  - Amount : decimal
  - PaymentMethod : string
  - PaymentDate : datetime
  - Status : string

  + ProcessPayment() : void
}


User "1" -- "*" Booking
Flight "1" -- "*" Schedule
Flight "1" -- "*" Seat
Schedule "1" -- "*" Booking
Seat "1" -- "*" Booking
Booking "1" -- "1" Payment


@enduml
Leave a Comment