Add files via upload

This commit is contained in:
QWQLwToo
2026-01-28 13:25:18 +08:00
committed by GitHub
parent 02f66ec447
commit 7030903eb6
77 changed files with 21573 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"
)
// User 用户实体(用于JWT认证)
type User struct {
ent.Schema
}
func (User) Fields() []ent.Field {
return []ent.Field{
field.Int("id"),
field.String("username").Unique().Comment("用户名"),
field.String("password").Comment("密码(bcrypt哈希)"),
}
}
func (User) Edges() []ent.Edge {
return nil
}