teacher

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Teacher

type Teacher struct {
	*apputils.ServerUtils
}

func (*Teacher) AddStudents

func (t *Teacher) AddStudents(c *gin.Context)

添加学生到指定班级 godoc @Summary 添加学生到指定班级 @Schemes @Description 添加学生到指定班级 @Tags classTeacher @Accept json @Produce json @Param token header string true "登录返回的Token" @Param studentid query []int64 true "学生用户ID" @Param classname query string true "班级名称" @Success 200 {object} model.CommonResponse[any] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/class/students/join [post]

func (*Teacher) Close

func (a *Teacher) Close() error

func (*Teacher) GetStudent

func (t *Teacher) GetStudent(c *gin.Context)

获得指定学生信息 godoc @Summary 获取指定学生信息 @Schemes @Description 获取指定学生信息 @Tags teacher @Accept json @Produce json @Param token header string true "登录返回的Token" @Param queryemail query string false "需要查询的学生邮箱" Format(email) @Param id query string false "需要查询学生ID" @Param name query string false "需要查询学生用户名" @Param queryRealname query string false "需要查询学生真实姓名" @Param queryUserSchoollD query string false "需要查询学生学号" @Success 200 {object} model.CommonResponse[[]model.GetUserResponse] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/student [post]

func (*Teacher) InitRoute

func (a *Teacher) InitRoute(g *gin.RouterGroup)

func (*Teacher) Join

func (t *Teacher) Join(c *gin.Context)

教师加入班级 godoc @Summary 教师加入班级 @Schemes @Description 教师加入班级 @Tags classTeacher @Accept json @Produce json @Param token header string true "登录返回的Token" @Param classname query string false "班级名称" @Success 200 {object} model.CommonResponse[any] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/class/join [post]

func (*Teacher) Leave

func (t *Teacher) Leave(c *gin.Context)

教师离开班级 godoc @Summary 教师离开班级 @Schemes @Description 教师离开班级 @Tags classTeacher @Accept json @Produce json @Param token header string true "登录返回的Token" @Param classname query string false "班级名称" @Success 200 {object} model.CommonResponse[any] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/class/leave [delete]

func (*Teacher) ListJoinedClass

func (t *Teacher) ListJoinedClass(c *gin.Context)

列出所有已加入的班级 godoc @Summary 列出所有已加入的班级 @Schemes @Description 列出所有已加入的班级 @Tags classTeacher @Accept json @Produce json @Param token header string true "登录返回的Token" @Success 200 {object} model.CommonResponse[[]GetClassResponse] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/class [get]

func (*Teacher) ListStudents

func (t *Teacher) ListStudents(c *gin.Context)

列出班级所有学生 godoc @Summary 列出班级所有学生 @Schemes @Description 列出班级所有学生 @Tags classTeacher @Accept json @Produce json @Param classname path string false "班级名称(可选), 只显示网络工程B的学生: /authrequired/teacher/class/students/21网络工程B" @Param token header string true "登录返回的Token" @Success 200 {object} model.CommonResponse[model.GetClassBelongsResponse] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/class/students/{classname} [get]

func (*Teacher) Modify

func (t *Teacher) Modify(c *gin.Context)

修改教师信息 godoc @Summary 修改教师相关信息 @Schemes @Description 修改教师相关信息 @Tags teacher @Accept json @Produce json @Param action path string false "查询过滤器,如果没有默认查询所以信息" @Param token header string true "登录返回的Token" @Param email query string false "修改邮箱" Format(email) @Param realName query string false "修改真实姓名" @Param userSchoollD query string false "修改学号" @Param schoolCode query string false "修改学校代码" @Param class query string false "修改班级" @Param sex query string false "修改性别" @Success 200 {object} model.CommonResponse[any] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher [patch]

func (*Teacher) ModifyPassword

func (t *Teacher) ModifyPassword(c *gin.Context)

修改教师密码 godoc @Summary 修改教师密码 @Schemes @Description 修改教师密码 @Tags teacher @Accept json @Produce json @Param action path string false "查询过滤器,如果没有默认查询所以信息" Format(email) @Param token header string true "登录返回的Token" @Param password query string false "需要修改的密码" @Success 200 {object} model.CommonResponse[any] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/password [patch]

func (*Teacher) RegisterStudent

func (t *Teacher) RegisterStudent(c *gin.Context)

添加/注册一位学生 godoc @Summary 添加/注册一个学生 @Schemes @Description 添加/注册一个学生 @Tags teacher @Accept json @Produce json @Param token query string true "登录返回的Token" @Param name query string true "新用户用户名" @Param email query string true "新用户邮箱" Format(email) @Param realName query string true "新用户真实姓名" @Param userSchoollD query string true "新用户学号" @Param schoolCode query string true "新用户学校代码" @Param class query string true "新用户班级" @Param sex query string true "新用户性别" @Success 200 {object} model.CommonResponse[any] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/student/new [post]

func (*Teacher) RemoveStudents

func (t *Teacher) RemoveStudents(c *gin.Context)

从指定班级移除学生 godoc @Summary 从指定班级移除学生 @Schemes @Description 从指定班级移除学生 @Tags classTeacher @Accept json @Produce json @Param token header string true "登录返回的Token" @Param studentid query []int64 true "学生用户ID" @Success 200 {object} model.CommonResponse[any] @Failure 400 {object} model.CommonResponse[any] @Router /authrequired/teacher/class/students/leave [delete]

Jump to

Keyboard shortcuts

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