feat: add entgo mixin and sonyflake.
This commit is contained in:
21
entgo/mixin/remark.go
Normal file
21
entgo/mixin/remark.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package mixin
|
||||
|
||||
import (
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/schema/field"
|
||||
"entgo.io/ent/schema/mixin"
|
||||
)
|
||||
|
||||
type Remark struct {
|
||||
mixin.Schema
|
||||
}
|
||||
|
||||
func (Remark) Fields() []ent.Field {
|
||||
return []ent.Field{
|
||||
field.String("remark").
|
||||
Comment("备注").
|
||||
Default("").
|
||||
Optional().
|
||||
Nillable(),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user