Documentation ¶
Index ¶
- Constants
- Variables
- type AccountLoginReq
- type AccountLoginResp
- type AdminAccountTable
- type DateCount
- type DateCountItem
- type KnowledgeListResp
- type KnowledgeListRespItem
- type KnowledgeTable
- type OtherField
- type ProfileApiDetailEditReq
- type ProfileApiDetailResp
- type ReSubjectStudyReq
- type StateAmount
- type StudyDateCountReq
- type StudyDateCountResp
- type StudyDoingReq
- type StudyDoingResp
- type StudyKnowledgeItem
- type StudyKnowledgeReq
- type StudyKnowledgeResp
- type StudyNumEditReq
- type StudyRankResp
- type StudyRecord
- type StudyRecordItem
- type StudyRecordListResp
- type StudyRecordTable
- type StudySummaryReq
- type StudySummaryResp
- type SubjectDetailReq
- type SubjectItem
- type SubjectListResp
- type SubjectOpsCreateReq
- type SubjectOpsEditReq
- type SubjectOpsItem
- type SubjectOpsListReq
- type SubjectOpsListReqFilter
- type SubjectStudyReq
- type SubjectTable
- type TodayStudySortRespItem
- type UserProfileTable
- type UserStudyRank
Constants ¶
View Source
const ( TableNameKnowledge = "knowledge" DefaultStudyBatch = 100 )
View Source
const ( TableNameStudyRecord = "study_record" StateStudied = 0 StateNotStudied = 1 )
View Source
const ( GenderUnknown = 0 GenderMan = 1 GenderWoman = 2 )
View Source
const ( TableNameUserProfile = "user_profile" DefaultStudyNum = 100 )
View Source
const (
TableNameAdminAccount = "admin_account"
)
View Source
const (
TableNameSubject = "subject"
)
Variables ¶
View Source
var ( ErrStudyMineProfileNotExist = errors.New("not exits mine profile") ErrStudyUserProfileNotExist = errors.New("not exits user profile") )
Functions ¶
This section is empty.
Types ¶
type AccountLoginReq ¶
type AccountLoginResp ¶
type AdminAccountTable ¶
type DateCountItem ¶
type KnowledgeListResp ¶
type KnowledgeListResp struct { List []*KnowledgeListRespItem `json:"list"` HasMore bool `json:"has_more"` }
type KnowledgeListRespItem ¶
type KnowledgeListRespItem struct { ID int64 `json:"id"` SubjectID int64 `json:"subject_id"` Name string `json:"name"` Description string `json:"description"` Other OtherField `json:"other"` }
type KnowledgeTable ¶
type KnowledgeTable struct { model.BaseModel SubjectID int64 // 题库id Name string // 名称 Description string // 描述 Other string // 其他字段;json }
知识点表
type OtherField ¶
type OtherField struct {
Pinyin string `json:"pinyin"`
}
type ProfileApiDetailEditReq ¶
type ProfileApiDetailResp ¶
type ProfileApiDetailResp struct { UpdatedAt int64 `json:"updated_at"` Uid int64 `json:"uid"` // 用户ID Name string `json:"name"` // 用户昵称 Gender int `json:"gender"` // 性别 1-男;2-女 Portrait string `json:"portrait"` // 头像 CurrentSubjectId int64 `json:"current_subject_id"` StudyTotalDay int `json:"study_total_day"` StudyNum int `json:"study_num"` }
type ReSubjectStudyReq ¶
type ReSubjectStudyReq struct {
ID int64 `json:"id" validate:"required"`
}
type StateAmount ¶
type StudyDateCountReq ¶
type StudyDateCountReq struct {
StartTime int64 `form:"start_time" validate:"gt=0"`
}
type StudyDateCountResp ¶
type StudyDateCountResp struct {
DateCountList []*DateCount `json:"date_count_list"`
}
type StudyDoingReq ¶
type StudyDoingResp ¶
type StudyDoingResp struct {
IsCompletedToday bool `json:"is_completed_today"`
}
type StudyKnowledgeItem ¶
type StudyKnowledgeItem struct { ID int64 `json:"id"` Name string `json:"name"` Description string `json:"description"` Other OtherField `json:"other"` }
type StudyKnowledgeReq ¶
type StudyKnowledgeReq struct {
SubjectID int64 `form:"subject_id" validate:"gt=0"`
}
type StudyKnowledgeResp ¶
type StudyKnowledgeResp struct { List []*StudyKnowledgeItem `json:"list"` HasStudied int `json:"has_studied"` HasMore bool `json:"has_more"` }
type StudyNumEditReq ¶
type StudyNumEditReq struct {
Num int `json:"num" validate:"required"`
}
type StudyRankResp ¶
type StudyRankResp struct { Mine *TodayStudySortRespItem `json:"mine"` List []*TodayStudySortRespItem `json:"list"` }
type StudyRecord ¶
type StudyRecordItem ¶
type StudyRecordListResp ¶
type StudyRecordListResp struct { List []*StudyRecordItem `json:"list"` HasMore bool `json:"has_more"` }
type StudyRecordTable ¶
type StudyRecordTable struct { model.BaseModel Uid int64 SubjectID int64 // 题库id KnowledgeID int64 // 知识点id State int }
学习记录表
type StudySummaryReq ¶
type StudySummaryReq struct {
SubjectID int64 `form:"subject_id" validate:"gt=0"`
}
type StudySummaryResp ¶
type SubjectDetailReq ¶
type SubjectItem ¶
type SubjectListResp ¶
type SubjectListResp struct { Studying *SubjectItem `json:"studying"` Others []*SubjectItem `json:"others"` }
type SubjectOpsCreateReq ¶
type SubjectOpsEditReq ¶
type SubjectOpsItem ¶
type SubjectOpsListReq ¶
type SubjectOpsListReqFilter ¶
type SubjectOpsListReqFilter struct {
Name string
}
type SubjectStudyReq ¶
type SubjectStudyReq struct {
ID int64 `json:"id" validate:"required"`
}
type SubjectTable ¶
type SubjectTable struct { model.BaseModel Name string // 题库名称 Description string // 描述 Total int // 题库总数量 }
题库表
type TodayStudySortRespItem ¶
type UserProfileTable ¶
type UserStudyRank ¶
Click to show internal directories.
Click to hide internal directories.