model

package
v0.0.0-...-bd761ab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 2 Imported by: 0

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL