models

package
v0.0.0-...-3b707a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2025 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	Front string `json:"front,omitempty" bson:"front,omitempty" encryption:"true"`
	Back  string `json:"back,omitempty" bson:"back,omitempty" encryption:"true"`
}

type EmergencyContact

type EmergencyContact struct {
	Name         string `json:"name" bson:"name" binding:"required,max=10" encryption:"true"`
	Relationship string `json:"relationship" bson:"relationship" binding:"required,max=10" encryption:"true"`
	Phone        string `json:"phone" bson:"phone" binding:"required,max=10" encryption:"true"`
}

type GetStaff

type GetStaff struct {
	UUID            string `json:"uuid" bson:"_id"`
	Email           string `json:"email" bson:"email"`
	OfficialEmail   string `json:"official_email" bson:"official_email"`
	HighSchoolStage string `json:"high_school_stage" bson:"high_school_stage"`
	DiscordID       string `json:"discord_id,omitempty" bson:"discord_id,omitempty"`
	CurrentGroup    string `json:"current_group" bson:"current_group"`
	PermissionLevel int    `json:"permission_level" bson:"permission_level"`
	TeamLeader      string `json:"team_leader,omitempty" bson:"team_leader,omitempty" binding:"max=30"`
	ApplyMessage    string `json:"apply_message,omitempty" bson:"apply_message,omitempty" binding:"max=30"`
}

type GetUser

type GetUser struct {
	UUID              string             `json:"id,omitempty" bson:"_id"`
	IsRepresentative  bool               `json:"is_representative,omitempty" bson:"is_representative,omitempty"`
	TeamID            string             `json:"team_id" bson:"team_id"`
	Name              string             `json:"name,omitempty" bson:"name,omitempty"`
	Gender            string             `json:"gender,omitempty" bson:"gender,omitempty"`
	School            string             `json:"school,omitempty" bson:"school,omitempty"`
	Grade             string             `json:"grade,omitempty" bson:"grade,omitempty"`
	IdentityNumber    string             `json:"identity_number,omitempty" bson:"identity_number,omitempty"`
	UserNumber        int                `json:"user_number,omitempty" bson:"user_number,omitempty"`
	Birthday          string             `json:"birthday,omitempty" bson:"birthday,omitempty"`
	Email             string             `json:"email,omitempty" bson:"email,omitempty"`
	Phone             string             `json:"phone,omitempty" bson:"phone,omitempty"`
	EmergencyContacts []EmergencyContact `json:"emergency_contacts,omitempty" bson:"emergency_contacts,omitempty"`
	TShirtSize        string             `json:"t_shirt_size,omitempty" bson:"t_shirt_size,omitempty"`
	Allergies         string             `json:"allergies,omitempty" bson:"allergies,omitempty"`
	SpecialDiseases   string             `json:"special_diseases,omitempty" bson:"special_diseases,omitempty"`
	Remarks           string             `json:"remarks,omitempty" bson:"remarks,omitempty"`
	VerificationCode  string             `json:"verification_code,omitempty" bson:"verification_code,omitempty"`
	CheckedIn         bool               `json:"checked_in,omitempty" bson:"checked_in,omitempty"`
	CreatedAt         time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt         time.Time          `json:"updated_at" bson:"updated_at"`
}

type Staff

type Staff struct {
	UUID               string             `json:"uuid" bson:"_id" binding:"required,uuid"`
	RealName           string             `json:"real_name" bson:"real_name" binding:"required,max=10" encryption:"true"`
	Nickname           string             `json:"nickname,omitempty" bson:"nickname,omitempty" binding:"max=20" encryption:"true"`
	Email              string             `json:"email" bson:"email" binding:"required,email,max=320"`
	OfficialEmail      string             `json:"official_email" bson:"official_email" binding:"required,email,max=320"`
	PhoneNumber        string             `json:"phone_number" bson:"phone_number" binding:"required,max=10" encryption:"true"`
	HighSchoolStage    string             `json:"high_school_stage" bson:"high_school_stage" binding:"required,oneof=高一 高二 高三 高中以上"`
	City               string             `json:"city" bson:"city" binding:"required,max=20" encryption:"true"`
	School             string             `json:"school,omitempty" bson:"school,omitempty" binding:"max=100" encryption:"true"`
	NationalID         string             `json:"national_id" bson:"national_id,omitempty" binding:"max=10"`
	StudentCard        Card               `json:"student_card,omitempty" bson:"student_card,omitempty" encryption:"true"`
	IDCard             Card               `json:"id_card,omitempty" bson:"id_card,omitempty" encryption:"true"`
	EmergencyContact   []EmergencyContact `json:"emergency_contact,omitempty" bson:"emergency_contact,omitempty" binding:"min=1,max=2,dive" encryption:"true"`
	DiscordID          string             `json:"discord_id,omitempty" bson:"discord_id,omitempty" binding:"max=30"`
	Introduction       string             `json:"introduction,omitempty" bson:"introduction,omitempty" binding:"max=1000" encryption:"true"`
	Choicereason       string             `json:"choicereason,omitempty" bson:"choicereason,omitempty" binding:"max=1000" encryption:"true"`
	RelevantExperience string             `json:"relevant_experience,omitempty" bson:"relevant_experience,omitempty" binding:"max=1000" encryption:"true"`
	SignatureUrl       string             `json:"signature_url,omitempty" bson:"signature_url,omitempty" binding:"max=200"`
	CurrentGroup       string             `` /* 243-byte string literal not displayed */
	PermissionLevel    int                `json:"permission_level" bson:"permission_level" binding:"required,oneof=1 2 3 4 5 6 0 10"`
	TeamLeader         string             `json:"team_leader,omitempty" bson:"team_leader,omitempty" binding:"max=30"`
	ApplyMessage       string             `json:"apply_message,omitempty" bson:"apply_message,omitempty" binding:"max=200"`
	CreatedAt          time.Time          `json:"created_at" bson:"created_at"`
}

type UpdateStaff

type UpdateStaff struct {
	RealName         string             `json:"real_name,omitempty" bson:"real_name,omitempty" binding:"max=10" encryption:"true"`
	Nickname         string             `json:"nickname,omitempty" bson:"nickname,omitempty" binding:"max=20" encryption:"true"`
	Email            string             `json:"email,omitempty" bson:"email,omitempty" binding:"max=320"`
	OfficialEmail    string             `json:"official_email,omitempty" bson:"official_email,omitempty" binding:"max=320"`
	PhoneNumber      string             `json:"phone_number,omitempty" bson:"phone_number,omitempty" binding:"max=20" encryption:"true"`
	HighSchoolStage  string             `json:"high_school_stage,omitempty" bson:"high_school_stage,omitempty"`
	City             string             `json:"city,omitempty" bson:"city,omitempty" binding:"max=20" encryption:"true"`
	School           string             `json:"school,omitempty" bson:"school,omitempty" binding:"max=100" encryption:"true"`
	NationalID       string             `json:"national_id,omitempty" bson:"national_id,omitempty" binding:"max=10"`
	StudentCard      Card               `json:"student_card,omitempty" bson:"student_card,omitempty" encryption:"true"`
	IDCard           Card               `json:"id_card,omitempty" bson:"id_card,omitempty" encryption:"true"`
	EmergencyContact []EmergencyContact `json:"emergency_contact,omitempty" bson:"emergency_contact,omitempty" binding:"max=2,dive" encryption:"true"`
	DiscordID        string             `json:"discord_id,omitempty" bson:"discord_id,omitempty" binding:"max=30"`
	Introduction     string             `json:"introduction,omitempty" bson:"introduction,omitempty" binding:"max=1000" encryption:"true"`
	CurrentGroup     string             `json:"current_group,omitempty" bson:"current_group,omitempty"`
	TeamLeader       string             `json:"team_leader,omitempty" bson:"team_leader,omitempty" binding:"max=30"`
	ApplyMessage     string             `json:"apply_message,omitempty" bson:"apply_message,omitempty" binding:"max=200"`
	PermissionLevel  int                `json:"permission_level,omitempty" bson:"permission_level,omitempty"`
}

type User

type User struct {
	UUID              string             `json:"uuid,omitempty" bson:"_id" binding:"required,uuid"`
	IsRepresentative  bool               `json:"is_representative,omitempty" bson:"is_representative,omitempty" binding:"boolean"`
	TeamID            string             `json:"team_id" bson:"team_id"`
	Name              string             `json:"name,omitempty" bson:"name,omitempty" binding:"required"`
	Gender            string             `json:"gender,omitempty" bson:"gender,omitempty" binding:"required,oneof=male female other"`
	School            string             `json:"school,omitempty" bson:"school,omitempty" binding:"required"`
	Grade             string             `json:"grade,omitempty" bson:"grade,omitempty" binding:"required"`
	IdentityNumber    string             `json:"identity_number,omitempty" bson:"identity_number,omitempty" binding:"required,len=10"`
	StudentCardFront  string             `json:"student_card_front,omitempty" bson:"student_card_front,omitempty" binding:"required,base64"`
	StudentCardBack   string             `json:"student_card_back,omitempty" bson:"student_card_back,omitempty" binding:"required,base64"`
	UserNumber        int                `json:"user_number,omitempty" bson:"user_number,omitempty" binding:"required,number"`
	Birthday          string             `json:"birthday,omitempty" bson:"birthday,omitempty" binding:"required"`
	Email             string             `json:"email,omitempty" bson:"email,omitempty" binding:"required,email"`
	Phone             string             `json:"phone,omitempty" bson:"phone,omitempty" binding:"required,max=10,min=10"`
	EmergencyContacts []EmergencyContact `json:"emergency_contacts,omitempty" bson:"emergency_contacts,omitempty" binding:"required,max=2,dive,min=1"`
	TShirtSize        string             `json:"t_shirt_size,omitempty" bson:"t_shirt_size,omitempty" binding:"required,oneof=XS S M L XL"`
	Allergies         string             `json:"allergies,omitempty" bson:"allergies,omitempty" binding:"required"`
	SpecialDiseases   string             `json:"special_diseases,omitempty" bson:"special_diseases,omitempty" binding:"required"`
	Remarks           string             `json:"remarks,omitempty" bson:"remarks,omitempty" binding:"required"`
	VerificationCode  string             `json:"verification_code,omitempty" bson:"verification_code,omitempty" binding:"required,len=6"`
	CheckedIn         bool               `json:"checked_in,omitempty" bson:"checked_in,omitempty" binding:"required"`
	CreatedAt         time.Time          `json:"created_at" bson:"created_at"`
	UpdatedAt         time.Time          `json:"updated_at" bson:"updated_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL