25 lines
1.2 KiB
Go
25 lines
1.2 KiB
Go
package model
|
||
|
||
import (
|
||
"time"
|
||
|
||
"gorm.io/gorm"
|
||
)
|
||
|
||
const TableNameFragmentSynthesisRecipes = "fragment_synthesis_recipes"
|
||
|
||
type FragmentSynthesisRecipes struct {
|
||
ID int64 `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键ID" json:"id"`
|
||
CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP(3);comment:创建时间" json:"created_at"`
|
||
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP(3);comment:更新时间" json:"updated_at"`
|
||
Name string `gorm:"column:name;not null;comment:合成配方名称" json:"name"`
|
||
Description string `gorm:"column:description;not null;default:'';comment:合成配方描述" json:"description"`
|
||
TargetProductID int64 `gorm:"column:target_product_id;not null;comment:合成目标商品ID" json:"target_product_id"`
|
||
Status int32 `gorm:"column:status;not null;default:1;comment:状态:1启用 2禁用" json:"status"`
|
||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
|
||
}
|
||
|
||
func (*FragmentSynthesisRecipes) TableName() string {
|
||
return TableNameFragmentSynthesisRecipes
|
||
}
|