Untitled
@startuml !include <CSharpskin> namespace Models { 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 } 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 } } namespace ViewModels { class UserViewModel { + User : Models.User + LoginCommand : ICommand + // Other commands and properties for user interactions } class CustomerViewModel { + SearchFlightsCommand : ICommand + SelectSeatCommand : ICommand + MakeBookingCommand : ICommand + // Other commands and properties for customer interactions } class AdminViewModel { + AddFlightCommand : ICommand + UpdateFlightCommand : ICommand + // Other commands and properties for admin interactions } class FlightSearchViewModel { + SearchCriteria : FlightSearchCriteria + SearchResults : ObservableCollection<Models.Flight> + SearchCommand : ICommand } class BookingViewModel { + CurrentBooking : Models.Booking + ConfirmBookingCommand : ICommand + CancelBookingCommand : ICommand } // ... other ViewModels as needed } namespace Views { class MainWindow { // WPF Window for main application UI } class LoginWindow { - ViewModel : ViewModels.UserViewModel } class FlightSearchView { // WPF UserControl for searching flights } class SeatSelectionView { // WPF UserControl for selecting seats } // ... other Views as needed } Models.User "1" -- "*" Models.Booking Models.Flight "1" -- "*" Models.Schedule Models.Flight "1" -- "*" Models.Seat Models.Schedule "1" -- "*" Models.Booking Models.Seat "1" -- "*" Models.Booking Views.LoginWindow --> ViewModels.UserViewModel : Uses ViewModels.UserViewModel --> Models.User : Accesses/Updates @enduml
Leave a Comment