package entities import "time" type ProjectFlockKandang struct { Id uint `gorm:"primaryKey"` ProjectFlockId uint `gorm:"not null;index:idx_project_flock_kandangs_project;uniqueIndex:idx_project_flock_kandangs_active,priority:1,where:detached_at IS NULL"` KandangId uint `gorm:"not null;index:idx_project_flock_kandangs_kandang;uniqueIndex:idx_project_flock_kandangs_active,priority:2,where:detached_at IS NULL"` CreatedBy uint `gorm:"not null"` AssignedAt time.Time `gorm:"autoCreateTime"` DetachedAt *time.Time `gorm:"index"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` ProjectFlock ProjectFlock `gorm:"foreignKey:ProjectFlockId;references:Id"` Kandang Kandang `gorm:"foreignKey:KandangId;references:Id"` CreatedUser User `gorm:"foreignKey:CreatedBy;references:Id"` }