add: some user api and all api desc
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user