Files
juwan-backend/app/user_verifications/rpc/internal/models/schema/userverifications.go
T
2026-02-27 19:17:01 +08:00

40 lines
1.0 KiB
Go

package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"
)
// UserVerifications holds the schema definition for the UserVerifications entity.
type UserVerifications struct {
ent.Schema
}
type MaterialStruct struct {
IdCardFront string `json:"idCardFront"`
IdCardBack string `json:"idCardBack"`
GameScreenshots []string `json:"gameScreenshots"`
VoiceDemo string `json:"voiceDemo"`
}
// Fields of the UserVerifications.
func (UserVerifications) Fields() []ent.Field {
return []ent.Field{
field.Int64("id").Immutable().Unique(),
field.Int64("user_id").Immutable().Unique(),
field.String("role").Unique(),
field.String("status").Default("pending"),
field.JSON("materials", MaterialStruct{}),
field.String("reject_reason").Default(""),
field.Int64("reviewed_by"),
field.Time("reviewed_at").Immutable(),
field.Time("created_at").Immutable(),
field.Time("updated_at").Immutable(),
}
}
// Edges of the UserVerifications.
func (UserVerifications) Edges() []ent.Edge {
return nil
}