rentease/internal/booking/models.go
2024-02-16 15:37:43 +01:00

32 lines
638 B
Go

package booking
import (
"time"
"gorm.io/gorm"
)
type Booking struct {
gorm.Model
Id int
Name string `gorm:"column:customer_name"`
PhoneNumber string
CustomerNumber int `gorm:"column:customers"`
Email string
From time.Time
To time.Time
Platform string
PlatformFees float64 `gorm:"type:decimal(10,2)"`
Items []Item
}
type Item struct {
gorm.Model
Id int
BookingId int
Item string
Quantity int
Price float64 `gorm:"type:decimal(10,2)"`
PaymentMethod string
PaymentStatus string `gorm:"default:Pending"`
}