mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 23:35:43 +00:00
daily checklist can edit empty kandang kosong
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package entities
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type DailyChecklistEmptyKandang struct {
|
||||
Id uint `gorm:"primaryKey"`
|
||||
DailyChecklistId uint `gorm:"not null"`
|
||||
KandangId uint `gorm:"not null"`
|
||||
StartDate time.Time `gorm:"type:date;not null"`
|
||||
EndDate time.Time `gorm:"type:date;not null"`
|
||||
CreatedBy *uint
|
||||
DeletedBy *uint
|
||||
CreatedAt time.Time `gorm:"autoCreateTime"`
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
|
||||
DailyChecklist *DailyChecklist `gorm:"foreignKey:DailyChecklistId;references:Id"`
|
||||
Kandang *KandangGroup `gorm:"foreignKey:KandangId;references:Id"`
|
||||
}
|
||||
|
||||
func (DailyChecklistEmptyKandang) TableName() string {
|
||||
return "daily_checklist_empty_kandangs"
|
||||
}
|
||||
@@ -23,11 +23,12 @@ type DailyChecklist struct {
|
||||
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
|
||||
Kandang KandangGroup `gorm:"foreignKey:KandangId;references:Id"`
|
||||
Checklist *Checklist `gorm:"foreignKey:ChecklistId;references:Id"`
|
||||
Creator *User `gorm:"foreignKey:CreatedBy;references:Id"`
|
||||
Deleter *User `gorm:"foreignKey:DeletedBy;references:Id"`
|
||||
Tasks []DailyChecklistTask `gorm:"foreignKey:DailyChecklistId;references:Id"`
|
||||
Kandang KandangGroup `gorm:"foreignKey:KandangId;references:Id"`
|
||||
Checklist *Checklist `gorm:"foreignKey:ChecklistId;references:Id"`
|
||||
Creator *User `gorm:"foreignKey:CreatedBy;references:Id"`
|
||||
Deleter *User `gorm:"foreignKey:DeletedBy;references:Id"`
|
||||
Tasks []DailyChecklistTask `gorm:"foreignKey:DailyChecklistId;references:Id"`
|
||||
EmptyKandang *DailyChecklistEmptyKandang `gorm:"foreignKey:DailyChecklistId;references:Id"`
|
||||
}
|
||||
|
||||
type DailyChecklistPhase struct {
|
||||
|
||||
Reference in New Issue
Block a user