Files
Home-Vue-Go/internal/ent/schema/contact.go
T
2026-01-28 13:25:18 +08:00

28 lines
728 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"
)
// Contact 联系方式实体
type Contact struct {
ent.Schema
}
func (Contact) Fields() []ent.Field {
return []ent.Field{
field.Int("id"),
field.String("type").Comment("联系方式类型(Email, Github, 支付宝, 微信等)"),
field.String("icon").Comment("图标类名"),
field.String("url").Optional().Comment("链接URLmailto:或https://"),
field.String("qr_code").Optional().Comment("二维码图片URL或路径"),
field.String("hover_color").Optional().Comment("悬停颜色"),
field.Int("sort_order").Default(0).Comment("排序顺序"),
}
}
func (Contact) Edges() []ent.Edge {
return nil
}