18 lines
439 B
Go
18 lines
439 B
Go
|
|
package models
|
||
|
|
|
||
|
|
import (
|
||
|
|
"time"
|
||
|
|
|
||
|
|
"gorm.io/gorm"
|
||
|
|
)
|
||
|
|
|
||
|
|
// Schedule represents available time slots
|
||
|
|
type Schedule struct {
|
||
|
|
gorm.Model
|
||
|
|
StartTime time.Time `json:"start_time" gorm:"not null"`
|
||
|
|
EndTime time.Time `json:"end_time" gorm:"not null"`
|
||
|
|
IsAvailable bool `json:"is_available" gorm:"default:true"`
|
||
|
|
MaxBookings int `json:"max_bookings" gorm:"default:1"`
|
||
|
|
BookedCount int `json:"booked_count" gorm:"default:0"`
|
||
|
|
}
|