models

package
v0.0.0-...-b0ec221 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTClaims

type JWTClaims struct {
	jwt.StandardClaims
	UserID int64  `json:"user_id"`
	Role   string `json:"role"`
}

type StudentInsert

type StudentInsert struct {
	FirstName       string `json:"first_name" binding:"required"`
	SecondName      string `json:"second_name" binding:"required"`
	Gender          string `json:"gender" binding:"required"`
	GroupNumber     string `json:"group_number" binding:"required"`
	GraduationYear  int16  `json:"graduation_year" binding:"required"`
	ExamScore       int16  `json:"exam_score" binding:"required"`
	AdditionalScore int8   `json:"additional_score" binding:"required"`
}

type StudentPageRequest

type StudentPageRequest struct {
	PageSize int64
	PageNum  int64
}

type StudentResponse

type StudentResponse struct {
	StudentID       int64  `json:"student_id"`
	FirstName       string `json:"first_name"`
	SecondName      string `json:"second_name"`
	Gender          string `json:"gender"`
	GroupNumber     string `json:"group_number"`
	GraduationYear  int16  `json:"graduation_year"`
	ExamScore       int16  `json:"exam_score"`
	AdditionalScore int8   `json:"additional_score"`
}

type StudentResponseOptional

type StudentResponseOptional struct {
	StudentID       *int64  `json:"student_id,omitempty"`
	FirstName       *string `json:"first_name,omitempty"`
	SecondName      *string `json:"second_name,omitempty"`
	Gender          *string `json:"gender,omitempty"`
	GroupNumber     *string `json:"group_number,omitempty"`
	GraduationYear  *int16  `json:"graduation_year,omitempty"`
	ExamScore       *int16  `json:"exam_score,omitempty"`
	AdditionalScore *int8   `json:"additional_score,omitempty"`
}

type StudentUpdate

type StudentUpdate struct {
	StudentID int64 `json:"student_id" binding:"required"`
	StudentInsert
}

type UserAttach

type UserAttach struct {
	UserID    int64
	StudentID int64
}

type UserAuth

type UserAuth struct {
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type UserExistance

type UserExistance struct {
	Email string
}

type UserInsert

type UserInsert struct {
	Email             string `json:"email" binding:"required"`
	EncryptedPassword string `json:"encrypted_password" binding:"required"`
}

type UserResponse

type UserResponse struct {
	UserID            int64            `json:"user_id"`
	Email             string           `json:"email"`
	EncryptedPassword string           `json:"encrypted_password"`
	Role              string           `json:"role"`
	StudResponse      *StudentResponse `json:"student,omitempty"`
}

type UserRole

type UserRole struct {
	UserID int64  `json:"user_id"`
	Role   string `json:"role"`
}

type UserUpdate

type UserUpdate struct {
	UserID int64 `json:"user_id" binding:"required"`
	UserInsert
}

Jump to

Keyboard shortcuts

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