Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Db *dbProxy
Functions ¶
func MustInitDb ¶
func MustInitDb()
Types ¶
type DbController ¶
type DbController interface { //开设实验课,实验成绩相关的接口 CreateCourse(course *model.ExperimentCourse, courseType, studentIds []int64) error //开设实验课 MGetCourses(teacherId, startTime, endTime int64) ([]*model.CourseInfoRsp, error) //批量查询某个老师的实验课 MGetCourseAllInfo(courseId int64) (*model.CourseAllInfo, error) //批量查询某个实验课的所有学生关联的基本信息和老师的基本信息 CreateStudentsCourse(studentIds []int64, teacherId, courseId int64) error //插入学生与课程的信息 UpdateStudentsCourse(studentCourse *model.StudentCourse) error //更新学生某一个课程的信息 //实验室管理 CreateExperimentInfo(experimentInfo *model.ExperimentInfo) error // 创建实验室 UpdateExperimentInfo(experimentId int64, experimentInfo *model.ExperimentInfo) error //更新实验室信息 GetExperimentInfo(experimentId int64) (*model.ExperimentInfo, error) //查询实验室信息 MgetExperimentInfo(offest, limit int) ([]model.ExperimentInfo, error) //查询实验室信息 DeleteExperimentInfo(experimentId int64) error //删除实验室信息 //实验室学生预约占用管理 GetOrCreateExperimentSegmentInfo(experimentSegmentInfos *model.ExperimentSegmentInfo) error CreateExperimentReserveInfo(experimentReserveInfo *model.ExperimentReserveInfo) error //预约实验室,并且同步更新segment和预约表 UpdateExperimentReserveInfo(experimentReserveId, status int64) error GetExperimentSegmentInfo(experimentId int64, starTime int64, endTime int64) (*model.ExperimentSegmentInfo, error) //获得某个实验室某个时间段的信息 MGetExperimentSegmentInfo(starTime, endTime int64) ([]model.ExperimentSegmentInfo, error) //批量获取实验室某个时间段的信息 MGetExperimentReserveInfo(userId int64, starTime, endTime int64) ([]*model.ReserveInfoRsp, error) //获取某个人某个时间端的预约信息 GetExperimentReserveInfo(experimentReserveId int64) (*model.ExperimentReserveInfo, error) DeleteExperimentReserveInfo(experimentReserveId int64) error //删除预约,并且segment表进行相应的减一 //设备管理 CreateEquipmentInfo(equipmentInfo *model.EquipmentInfo) error // 创建设备 UpdateEquipmentInfo(equipmentId int64, equipmentInfo *model.EquipmentInfo) error //更新实验室信息 GetEquipmentInfo(equipmentId int64) (*model.EquipmentInfo, error) //查询设备 MgetEquipmentInfo(offest, limit int) ([]model.EquipmentInfo, error) //批量查询设备 DeleteEquipmentInfo(equipmentId int64) error //删除设备 //session管理 CreateSession(session *model.Session) error //创建session信息 UpdateSession(session *model.Session) error //更新session信息,失效时间 DeleteSession(sessionId, userId int64) error //删除session信息 GetSession(sessionId int64) (*model.Session, error) //查询session信息 MGetSession(userId int64) ([]model.Session, error) //查询用户的所有session CreateUserInfo(userInfo *model.UserInfo) error }
Click to show internal directories.
Click to hide internal directories.