rentease/internal/booking/models.go
2024-02-18 14:01:33 +01:00

32 lines
622 B
Go

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