update 17 mei
This commit is contained in:
@@ -46,3 +46,18 @@ type Booking struct {
|
||||
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
func (ClassSchedule) TableName() string {
|
||||
return "class_schedules"
|
||||
}
|
||||
|
||||
type ClassSchedule struct {
|
||||
ScheduleID int `gorm:"primaryKey;autoIncrement;column:schedule_id" json:"schedule_id"`
|
||||
KodeMK string `gorm:"type:varchar(50);not null;column:kode_mk" json:"kode_mk"`
|
||||
NamaMK string `gorm:"type:varchar(100);not null;column:nama_mk" json:"nama_mk"`
|
||||
RoomID int `gorm:"not null;column:room_id" json:"room_id"`
|
||||
Room Room `gorm:"foreignKey:RoomID" json:"room"`
|
||||
Hari string `gorm:"type:varchar(20);not null;column:hari" json:"hari"`
|
||||
JamMulai string `gorm:"type:time;not null;column:jam_mulai" json:"jam_mulai"`
|
||||
JamSelesai string `gorm:"type:time;not null;column:jam_selesai" json:"jam_selesai"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user