初始化
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
package schema
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
)
|
||||
|
||||
// Zone 库房区域
|
||||
// 待检/合格/不合格/退货区 等
|
||||
type Zone struct {
|
||||
ent.Schema
|
||||
}
|
||||
|
||||
func (Zone) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("zone_code").Unique().Comment("区域编码"),
|
||||
field.String("zone_name").Comment("区域名称"),
|
||||
field.String("description").Optional().Comment("描述"),
|
||||
field.Int64("created_at").DefaultFunc(nowUnix),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user