Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bill ¶
type Bill struct { gorm.Model CustomerName string `gorm:"not null" json:"customer_name"` // Name of the customer associated with the bill Amount float64 `gorm:"default:0.00;not null" json:"amount"` // Amount of the bill Description string `gorm:"not null" json:"description"` // Description or additional information about the bill Paid bool `gorm:"default:false;not null" json:"paid"` // Indicates whether the bill has been paid, default is false }
type Booking ¶
type Booking struct { gorm.Model RoomID uint `json:"room_id"` // ID of the room being booked UserID uint `json:"user_id"` // ID of the user making the booking CheckInDate time.Time `json:"check_in_date"` // Date and time of check-in CheckOutDate time.Time `json:"check_out_date"` // Date and time of check-out TotalCost float32 `gorm:"default:0.00;not null" json:"total_cost"` // Total cost of the booking }
type Room ¶
type Room struct { gorm.Model RoomNumber string `gorm:"not null" json:"room_number"` // A unique identifier for the room (e.g., room number or code) Type string `gorm:"not null" json:"type"` // Type of room (e.g., Single, Double, Suite) Description string `gorm:"not null" json:"description"` // Brief description of the room (features, amenities, etc.) Capacity int `gorm:"not null" json:"capacity"` // Maximum number of occupants the room can accommodate Price float32 `gorm:"default:0.00;not null" json:"price"` // Price per night for booking the room IsBooked bool `gorm:"default:false;not null" json:"is_booked"` // Indicates whether the room is currently booked BookedDates []Booking `json:"booked_dates"` }
Click to show internal directories.
Click to hide internal directories.