biz

package
v0.0.0-...-9653296 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 5 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is biz providers.

Functions

This section is empty.

Types

type ClassInfo

type ClassInfo struct {
	ID           string  `gorm:"primaryKey;column:id" json:"id"`                     //集合了课程信息的字符串,便于标识(课程ID)
	Day          int64   `gorm:"column:day;not null" json:"day"`                     //星期几
	Teacher      string  `gorm:"column:teacher;not null" json:"teacher"`             //任课教师
	Where        string  `gorm:"column:where;not null" json:"where"`                 //上课地点
	ClassWhen    string  `gorm:"column:class_when;not null" json:"class_when"`       //上课是第几节(如1-2,3-4)
	WeekDuration string  `gorm:"column:week_duration;not null" json:"week_duration"` //上课的周数
	Classname    string  `gorm:"column:class_name;not null" json:"classname"`        //课程名称
	Credit       float64 `gorm:"column:credit;default:1.0" json:"credit"`            //学分
	Weeks        int64   `gorm:"column:weeks;not null" json:"weeks"`                 //哪些周
	Semester     string  `gorm:"column:semester;not null" json:"semester"`           //学期
	Year         string  `gorm:"column:year;not null" json:"year"`                   //学年
}

type ClassListService

type ClassListService interface {
	GetAllSchoolClassInfos(ctx context.Context, xnm, xqm string) ([]ClassInfo, error)
	AddClassInfoToClassListService(ctx context.Context, req *v1.AddClassRequest) (*v1.AddClassResponse, error)
}

type ClassSerivceUserCase

type ClassSerivceUserCase struct {
	// contains filtered or unexported fields
}

func NewClassSerivceUserCase

func NewClassSerivceUserCase(es EsProxy, cs ClassListService, printer logPrinter.LogerPrinter) *ClassSerivceUserCase

func (*ClassSerivceUserCase) AddClassInfoToClassListService

func (c *ClassSerivceUserCase) AddClassInfoToClassListService(ctx context.Context, request *v1.AddClassRequest) (*v1.AddClassResponse, error)

func (*ClassSerivceUserCase) AddClassInfosToES

func (c *ClassSerivceUserCase) AddClassInfosToES(ctx context.Context)

func (*ClassSerivceUserCase) DeleteSchoolClassInfosFromES

func (c *ClassSerivceUserCase) DeleteSchoolClassInfosFromES(ctx context.Context)

func (*ClassSerivceUserCase) SearchClassInfo

func (c *ClassSerivceUserCase) SearchClassInfo(ctx context.Context, keyWords string, xnm, xqm string) ([]ClassInfo, error)

type EsProxy

type EsProxy interface {
	AddClassInfo(ctx context.Context, classInfo ClassInfo) error
	RemoveClassInfo(ctx context.Context, xnm, xqm string)
	SearchClassInfo(ctx context.Context, keyWords string, xnm, xqm string) ([]ClassInfo, error)
}

Jump to

Keyboard shortcuts

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