package model import ( "gorm.io/gorm" "time" ) type Factory struct { ID int64 `json:"id" gorm:"primaryKey"` Name string `json:"name"` Email string `json:"email"` Keyword string `json:"keyword"` FactoryExcel []FactoryExcel `json:"factory_excel" gorm:"foreignKey:FactoryID;references:ID"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"-"` DeletedAt *gorm.DeletedAt `json:"-" gorm:"index"` } type FactoryExcel struct { ID int64 `json:"id" gorm:"primaryKey"` ExcelTitle string `json:"excel_title"` Title string `json:"title"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"-"` DeletedAt *gorm.DeletedAt `json:"-" gorm:"index"` }