model

package
v0.0.0-...-971e649 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: GPL-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 AddClassResponse

type AddClassResponse struct {
	ClassID int64 `json:"classid"`
}

type AdminModifyPasswordRequest

type AdminModifyPasswordRequest struct {
	UserIDOnlyRequest
	Password string `json:"password"`
}

type AdminModifyRequest

type AdminModifyRequest struct {
	UserIDOnlyRequest
	Email        string `json:"email,omitempty"`
	RealName     string `json:"realName,omitempty"`
	UserSchoollD string `json:"userSchoollD,omitempty"`
	SchoolCode   string `json:"schoolCode,omitempty"`
	Class        string `json:"class,omitempty"`
	Sex          string `json:"sex,omitempty"`
}

type Class

type Class struct {
	TeacherID int64 `gorm:"column:teacherid" json:"teacherid"`
	ClassID   int64 `gorm:"column:classid" json:"classid"`
}

type ClassMap

type ClassMap struct {
	ClassID int64  `gorm:"column:classid"`
	Name    string `gorm:"column:classname"`
}

type ClassQueryRequest

type ClassQueryRequest struct {
	TeacherID int64 `json:"teacherid"`
	ClassID   int64 `json:"classid"`
}

type ClassWithStudent

type ClassWithStudent struct {
	ClassName string             `json:"classname"`
	Studetns  []*GetUserResponse `json:"students"`
}

type CommonClassRequest

type CommonClassRequest struct {
	ClassName string `json:"classname"`
}

type CommonResponse

type CommonResponse[T any] struct {
	Data   T                 `json:"data,omitempty"`
	Status errhandle.ErrCode `json:"status"`
	Reason string            `json:"reason"`
}

type GetClassBelongsResponse

type GetClassBelongsResponse struct {
	TeacherID int64               `json:"teacherid"`
	Classes   []*ClassWithStudent `json:"classes"`
}

type GetClassResponse

type GetClassResponse struct {
	TeacherID   int64  `json:"teacherid" gorm:"column:teacherid"`
	ClassID     int64  `json:"classid" gorm:"column:classid"`
	ClassName   string `json:"classname" gorm:"column:classname"`
	TeacherName string `json:"teachername" gorm:"column:realName"`
}

type GetTeacherStudentRequest

type GetTeacherStudentRequest struct {
	TeacherID int64 `json:"teacherid"`
}

type GetUserResponse

type GetUserResponse struct {
	ID           int64  `json:"id"`
	Name         string `json:"name"`
	Email        string `json:"email,omitempty"`
	RealName     string `json:"realName,omitempty"`
	UserSchoollD string `json:"userSchoollD,omitempty"`
	SchoolCode   string `json:"schoolCode,omitempty"`
	Class        string `json:"class,omitempty"`
	Sex          string `json:"sex,omitempty"`
}

type ModifyUserPasswordRequest

type ModifyUserPasswordRequest struct {
	Password string `json:"password"`
}

type ModifyUserRequest

type ModifyUserRequest struct {
	Email        string `json:"email,omitempty"`
	RealName     string `json:"realName,omitempty"`
	UserSchoollD string `json:"userSchoollD,omitempty"`
	SchoolCode   string `json:"schoolCode,omitempty"`
	Class        string `json:"class,omitempty"`
	Sex          string `json:"sex,omitempty"`
}

type QueryRequest

type QueryRequest struct {
	UserID            int    `json:"id"`
	Name              string `json:"name"`
	QueryEmail        string `json:"queryemail"`
	QueryRealName     string `json:"queryRealname"`
	QueryUserSchoollD string `json:"queryUserSchoollD"`
}

type RegisterUserRequest

type RegisterUserRequest struct {
	Name         string `json:"name"`
	Email        string `json:"email"`
	RealName     string `json:"realName"`
	UserSchoollD string `json:"userSchoollD"`
	SchoolCode   string `json:"schoolCode"`
	Class        string `json:"class"`
	Sex          string `json:"sex"`
	Password     string `json:"password"`
}

type SecurityQuestion

type SecurityQuestion struct {
	Title  string `json:"title"`
	Answer string `json:"answer"`
}

type StudentClassRequest

type StudentClassRequest struct {
	StudentID int64  `json:"studentid"`
	ClassName string `json:"classname"`
}

type StudentLeaveClassRequest

type StudentLeaveClassRequest struct {
	StudentID int64 `json:"studentid"`
}

type TeacherAddStudentRequest

type TeacherAddStudentRequest struct {
	StudentIDs []int64 `json:"studentid"`
	ClassName  string  `json:"classname"`
}

type TeacherClassRequest

type TeacherClassRequest struct {
	TeacherID int64  `json:"teacherid"`
	ClassName string `json:"classname"`
}

type TeacherRemoveStudentRequest

type TeacherRemoveStudentRequest struct {
	StudentIDs []int64 `json:"studentid"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken  string `json:"token"`
	RefreshToken string `json:"refreshtoken"`
	Scope        string `json:"scope"`
	ExpiredAt    int64  `json:"expiredAt"`
}

type User

type User struct {
	ID               int64              `gorm:"column:id"`
	Name             string             `gorm:"column:name"`
	Email            string             `gorm:"column:email"`
	RealName         string             `gorm:"column:realName"`
	UserSchoollD     string             `gorm:"column:userSchoollD"`
	SchoolCode       string             `gorm:"column:schoolCode"`
	Class            int64              `gorm:"column:class"`
	Role             string             `gorm:"column:role"`
	Sex              string             `gorm:"column:sex"`
	Password         string             `gorm:"column:password"`
	Security         UserSecurity       `gorm:"serializer:json;column:security"`
	SecurityQuestion []SecurityQuestion `gorm:"serializer:json;column:securityQuestion"`
}

type UserIDOnlyRequest

type UserIDOnlyRequest struct {
	UserID int `json:"id"`
}

type UserInfo

type UserInfo struct {
	UserID int64  `json:"userid"`
	Name   string `json:"name"`
	Role   string `json:"role"`
}

type UserLoginRequest

type UserLoginRequest struct {
	QueryRequest
	Password string `json:"password"`
}

type UserSecurity

type UserSecurity struct {
	EmailVerify bool `json:"emailVerify"`
}

Jump to

Keyboard shortcuts

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