Documentation ¶
Index ¶
- func New(cfg *config.Config)
- type AdminAccount
- type Dao
- type Knowledge
- func (k *Knowledge) Del(ctx context.Context, filters ...*mysqlstore.Filter) error
- func (k *Knowledge) ListBySubjectID(ctx context.Context, subjectID int64, start, limit int) ([]*model.KnowledgeTable, error)
- func (k *Knowledge) Update(ctx context.Context, m map[string]interface{}, filters ...*mysqlstore.Filter) error
- func (k *Knowledge) WillStudiedList(ctx context.Context, subjectID int64, kids []int64) ([]*model.KnowledgeTable, error)
- type StudyRecord
- func (s *StudyRecord) Del(ctx context.Context, filters ...*mysqlstore.Filter) error
- func (s *StudyRecord) GetDateCount(ctx context.Context, uid int64, startTime string) ([]*model.DateCountItem, error)
- func (s *StudyRecord) GetMineStudyRank(ctx context.Context, uid int64, startTime time.Time) (*model.UserStudyRank, error)
- func (s *StudyRecord) GetStateNum(ctx context.Context, uid, subjectId int64) (int, int, error)
- func (s *StudyRecord) GetUserStudyTank(ctx context.Context, startTime time.Time) ([]*model.UserStudyRank, error)
- func (s *StudyRecord) HasStudiedKids(ctx context.Context, uid, subjectID int64) ([]int64, error)
- func (s *StudyRecord) ListByUid(ctx context.Context, uid int64, start, limit int) ([]*model.StudyRecord, error)
- func (s *StudyRecord) TodayStudyNum(ctx context.Context, uid int64) (int64, error)
- func (s *StudyRecord) Update(ctx context.Context, m map[string]interface{}, filters ...*mysqlstore.Filter) error
- func (s *StudyRecord) Upsert(ctx context.Context, m *model.StudyRecordTable) error
- type Subject
- func (s *Subject) Create(ctx context.Context, m *model.SubjectTable) error
- func (s *Subject) Del(ctx context.Context, id int64) error
- func (s *Subject) GetById(ctx context.Context, id int64, filters ...*mysqlstore.Filter) (*model.SubjectTable, error)
- func (s *Subject) List(ctx context.Context) ([]*model.SubjectTable, error)
- func (s *Subject) ListOps(ctx context.Context, filter *model.SubjectOpsListReqFilter, sortStr string, ...) ([]*model.SubjectTable, int64, error)
- func (s *Subject) MapByIds(ctx context.Context, ids []int64) (map[int64]*model.SubjectTable, error)
- func (s *Subject) Update(ctx context.Context, id int64, m map[string]interface{}) error
- type User
- func (u *User) GetByOpenid(ctx context.Context, openid string) (*model.UserProfileTable, error)
- func (u *User) GetOne(ctx context.Context, uid int64) (*model.UserProfileTable, error)
- func (u *User) GetUserMap(ctx context.Context, uids []int64) (map[int64]*model.UserProfileTable, error)
- func (u *User) Save(ctx context.Context, models []*model.UserProfileTable) error
- func (u *User) StudyLastTime(ctx context.Context, uid int64) (time.Time, error)
- func (u *User) Update(ctx context.Context, m map[string]interface{}, filters ...*mysqlstore.Filter) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminAccount ¶
type AdminAccount struct{}
func (*AdminAccount) GetUserPwd ¶
func (a *AdminAccount) GetUserPwd(ctx context.Context, username string) (*model.AdminAccountTable, error)
type Dao ¶
type Dao struct { User *User Account *AdminAccount Subject *Subject Knowledge *Knowledge StudyRecord *StudyRecord // contains filtered or unexported fields }
var D *Dao
type Knowledge ¶
type Knowledge struct{}
func (*Knowledge) ListBySubjectID ¶
func (*Knowledge) WillStudiedList ¶
type StudyRecord ¶
type StudyRecord struct{}
func (*StudyRecord) Del ¶
func (s *StudyRecord) Del(ctx context.Context, filters ...*mysqlstore.Filter) error
func (*StudyRecord) GetDateCount ¶
func (s *StudyRecord) GetDateCount(ctx context.Context, uid int64, startTime string) ([]*model.DateCountItem, error)
func (*StudyRecord) GetMineStudyRank ¶
func (s *StudyRecord) GetMineStudyRank(ctx context.Context, uid int64, startTime time.Time) (*model.UserStudyRank, error)
todo
func (*StudyRecord) GetStateNum ¶
func (*StudyRecord) GetUserStudyTank ¶
func (s *StudyRecord) GetUserStudyTank(ctx context.Context, startTime time.Time) ([]*model.UserStudyRank, error)
todo
func (*StudyRecord) HasStudiedKids ¶
func (*StudyRecord) ListByUid ¶
func (s *StudyRecord) ListByUid(ctx context.Context, uid int64, start, limit int) ([]*model.StudyRecord, error)
func (*StudyRecord) TodayStudyNum ¶
func (*StudyRecord) Update ¶
func (s *StudyRecord) Update(ctx context.Context, m map[string]interface{}, filters ...*mysqlstore.Filter) error
func (*StudyRecord) Upsert ¶
func (s *StudyRecord) Upsert(ctx context.Context, m *model.StudyRecordTable) error
type Subject ¶
type Subject struct{}
func (*Subject) GetById ¶
func (s *Subject) GetById(ctx context.Context, id int64, filters ...*mysqlstore.Filter) (*model.SubjectTable, error)
type User ¶
type User struct{}
func (*User) GetByOpenid ¶
func (*User) GetUserMap ¶
func (*User) StudyLastTime ¶
Click to show internal directories.
Click to hide internal directories.