Untitled
unknown
plain_text
a year ago
3.4 kB
16
Indexable
@startuml
skinparam classAttributeIconSize 0 ' Hide icons for fields
namespace Models {
abstract class User <<(A,orchid)>> {
- UserID : int <<primaryKey>>
- Username : string
- Password : string
- FirstName : string
- LastName : string
- Email : string
- ContactNumber : string
- UserType : string <<readonly>>
}
class Customer <<(C,skyblue)>> extends User {
}
class Admin <<(A,orange)>> extends User {
}
class Flight {
- FlightNumber : string <<primaryKey>>
- Airline : string
- Origin : string
- Destination : string
- DepartureTime : datetime
- ArrivalTime : datetime
- AircraftType : string
- Status : string
}
class Schedule {
- ScheduleID : int <<primaryKey>>
- FlightNumber : string
- DepartureDate : date
- ArrivalDate : date
- Price : decimal
}
class Seat {
- SeatID : int <<primaryKey>>
- FlightNumber : string
- SeatNumber : string
- Class : string
- Availability : bool
}
class Booking {
- BookingID : int <<primaryKey>>
- UserID : int
- FlightNumber : string
- ScheduleID : int
- SeatID : int
- BookingDate : datetime
- TotalPrice : decimal
- PaymentStatus : string
}
}
namespace ViewModels {
class UserViewModel {
+ User : Models.User
+ LoginCommand : ICommand
+ LogoutCommand : ICommand
+ ViewProfileCommand : ICommand
+ EditProfileCommand : ICommand
}
class CustomerViewModel {
+ SearchFlightsCommand : ICommand
+ SelectSeatCommand : ICommand
+ MakeBookingCommand : ICommand
+ ViewBookingsCommand : ICommand
+ CancelBookingCommand : ICommand
}
class AdminViewModel {
+ AddFlightCommand : ICommand
+ UpdateFlightCommand : ICommand
+ DeleteFlightCommand : ICommand
+ ManageSchedulesCommand : ICommand
+ ViewUsersCommand : ICommand
+ ViewBookingsCommand : ICommand
}
class FlightSearchViewModel {
+ SearchCriteria : FlightSearchCriteria
+ SearchResults : ObservableCollection<Models.Flight>
+ SearchCommand : ICommand
}
class BookingViewModel {
+ CurrentBooking : Models.Booking
+ ConfirmBookingCommand : ICommand
+ CancelBookingCommand : ICommand
+ GenerateEticketCommand : ICommand
}
}
namespace Views {
class MainWindow {
// WPF Window for main application UI
}
class LoginWindow {
- ViewModel : ViewModels.UserViewModel
}
class FlightSearchView {
- ViewModel : ViewModels.FlightSearchViewModel
// WPF UserControl for searching flights
}
class SeatSelectionView {
- ViewModel : ViewModels.CustomerViewModel
// WPF UserControl for selecting seats
}
}
Models.User "1" -- "*" Models.Booking : books
Models.Flight "1" -- "*" Models.Schedule : has
Models.Flight "1" -- "*" Models.Seat : has
Models.Schedule "1" -- "*" Models.Booking : booked on
Models.Seat "1" -- "*" Models.Booking : includes
Views.LoginWindow --> ViewModels.UserViewModel : Uses
Views.FlightSearchView --> ViewModels.FlightSearchViewModel : Uses
Views.SeatSelectionView --> ViewModels.CustomerViewModel : Uses
ViewModels.UserViewModel --> Models.User : Accesses/Updates
ViewModels.FlightSearchViewModel --> Models.Flight : Accesses/Updates
ViewModels.CustomerViewModel --> Models.Booking : Accesses/Updates
ViewModels.BookingViewModel --> Models.Booking : Accesses/Updates
@enduml
Editor is loading...
Leave a Comment