test_data/model/factory.go
2024-07-17 15:13:00 +08:00

27 lines
830 B
Go

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"`
}