Documentation
¶
Index ¶
- Constants
- func CreateBook(info *Book) error
- func CreateBookCatalog(info *BookCatalog) error
- func CreateBookCatalogChapterList(list []BookCatalogChapter) error
- func CreateChapter(info *Chapter) error
- func CreateCouponList(list []Coupon) error
- func CreateCourse(info *Course) error
- func CreateCourseChannel(info *CourseChannel) error
- func CreateCourseComment(info *CourseComment) error
- func CreateCourseRemind(info *CourseRemind) error
- func CreateCourseType(info *CourseType) error
- func CreateMonthCourse(info *MonthCourse) error
- func CreateMonthCourseBook(info *MonthCourseBook) error
- func CreateMonthCourseCatalog(info *MonthCourseCatalog) error
- func CreateMonthCourseCatalogAudio(info *MonthCourseCatalogAudio) error
- func CreateMonthCourseCatalogChapter(info *MonthCourseCatalogChapter) error
- func CreateMonthCourseCatalogChapterList(list []MonthCourseCatalogChapter) error
- func CreateReadingPay(info *ReadingPay) error
- func CreateUser(info *User) error
- func CreateUserCourse(info *UserCourse) error
- func CreateUserCourseCheckin(info *UserCourseCheckin) error
- func DelBook(info *Book) error
- func DelBookCatalog(info *BookCatalog) error
- func DelBookCatalogChapter(info *BookCatalogChapter) error
- func DelChapter(info *Chapter) error
- func DelCourse(info *Course) error
- func DelCourseChannel(info *CourseChannel) error
- func DelMonthCourse(info *MonthCourse) error
- func DelMonthCourseBook(info *MonthCourseBook) error
- func DelMonthCourseCatalog(info *MonthCourseCatalog) error
- func DelMonthCourseCatalogChapter(info *MonthCourseCatalogChapter) error
- func GetBook(info *Book) (bool, error)
- func GetChapter(info *Chapter) (bool, error)
- func GetCoupon(info *Coupon) (bool, error)
- func GetCourse(info *Course) (bool, error)
- func GetCourseCommentCount() (int64, error)
- func GetCourseFromCourse(info *Course) (bool, error)
- func GetCourseMaxNum(info *Course) (bool, error)
- func GetCourseRemind(info *CourseRemind) (bool, error)
- func GetMonthCourseBookUnlock(courseId int64) (map[int64]int, error)
- func GetMonthCourseCatalog(info *MonthCourseCatalog) (bool, error)
- func GetMonthCourseCatalogAudio(info *MonthCourseCatalogAudio) (bool, error)
- func GetReadingPay(info *ReadingPay) (bool, error)
- func GetReadingPayWithStatus(info *ReadingPay) (bool, error)
- func GetUser(info *User) (bool, error)
- func GetUserCourseCheckFromUCM(info *UserCourseCheckin) (bool, error)
- func GetUserCourseCheckinCount(userId, courseId int64) (int64, error)
- func GetUserCourseFromId(info *UserCourse) (bool, error)
- func GetUserCourseFromUser(info *UserCourse) (bool, error)
- func GetUserFromOpenid(info *User) (bool, error)
- func InitDB(cfg *config.Config)
- func UpdateBook(info *Book) error
- func UpdateBookCatalog(info *BookCatalog) error
- func UpdateChapter(info *Chapter) error
- func UpdateChapterRemark(info *Chapter) error
- func UpdateCoupon(info *Coupon) error
- func UpdateCouponLock(info *Coupon) error
- func UpdateCourse(info *Course) error
- func UpdateCourseCommentReply(info *CourseComment) error
- func UpdateCourseCommentStatus(info *CourseComment) error
- func UpdateCourseRemindEndTime(info *CourseRemind) error
- func UpdateCourseRemindUserNum(info *CourseRemind) error
- func UpdateMonthCourse(info *MonthCourse) error
- func UpdateMonthCourseBook(info *MonthCourseBook) error
- func UpdateMonthCourseCatalog(info *MonthCourseCatalog) error
- func UpdateReadingPayStatus(info *ReadingPay) error
- func UpdateReadingPayStatusFromOpenId(info *ReadingPay) error
- func UpdateReadingPayUserInfo(info *ReadingPay) error
- func UpdateReadingPayWxInfo(info *ReadingPay) error
- func UpdateUserAll(info *User) error
- func UpdateUserCourseRefundInfo(info *UserCourse) error
- func UpdateUserCourseStatus(info *UserCourse) error
- func UpdateUserCourseTransactionRefundInfo(info *UserCourse) error
- func UpdateUserInfo(info *User) error
- func UpdateUserWxInfo(info *User) error
- type Book
- type BookCatalog
- type BookCatalogChapter
- type Chapter
- type Coupon
- type Course
- type CourseBookCatalogDetail
- type CourseBookCatalogTime
- type CourseBookDetail
- type CourseChannel
- type CourseComment
- type CourseRemind
- type CourseType
- type CourseUserList
- type MonthCourse
- type MonthCourseBook
- type MonthCourseBooks
- type MonthCourseCatalog
- func GetCourseCatalogList(courseId, bookId int64) ([]MonthCourseCatalog, error)
- func GetMonthCourseCatalogFromBook(bookId int64) ([]MonthCourseCatalog, error)
- func GetMonthCourseCatalogFromCourse(courseId, monthCourseId, bookId int64) ([]MonthCourseCatalog, error)
- func GetMonthCourseCatalogList(courseId, monthCourseId, bookId int64) ([]MonthCourseCatalog, error)
- type MonthCourseCatalogAudio
- type MonthCourseCatalogChapter
- type ReadingPay
- type RefundInfo
- type User
- type UserCourse
- type UserCourseAttendance
- type UserCourseCheckin
- type UserCourseComment
- type UserCourseCommentDetail
- type UserCourseDetail
- type UserCourseList
Constants ¶
View Source
const ( COMMENT_STATUS_SHOW = 1 COMMENT_STATUS_IGNORE = 2 )
Variables ¶
This section is empty.
Functions ¶
func CreateBook ¶
func CreateBookCatalog ¶
func CreateBookCatalog(info *BookCatalog) error
func CreateBookCatalogChapterList ¶
func CreateBookCatalogChapterList(list []BookCatalogChapter) error
func CreateChapter ¶
func CreateCouponList ¶
func CreateCourseChannel ¶
func CreateCourseChannel(info *CourseChannel) error
func CreateCourseComment ¶
func CreateCourseComment(info *CourseComment) error
func CreateCourseRemind ¶
func CreateCourseRemind(info *CourseRemind) error
func CreateCourseType ¶
func CreateCourseType(info *CourseType) error
func CreateMonthCourse ¶
func CreateMonthCourse(info *MonthCourse) error
func CreateMonthCourseBook ¶
func CreateMonthCourseBook(info *MonthCourseBook) error
func CreateMonthCourseCatalog ¶
func CreateMonthCourseCatalog(info *MonthCourseCatalog) error
func CreateMonthCourseCatalogAudio ¶
func CreateMonthCourseCatalogAudio(info *MonthCourseCatalogAudio) error
func CreateMonthCourseCatalogChapter ¶
func CreateMonthCourseCatalogChapter(info *MonthCourseCatalogChapter) error
func CreateMonthCourseCatalogChapterList ¶
func CreateMonthCourseCatalogChapterList(list []MonthCourseCatalogChapter) error
func CreateReadingPay ¶
func CreateReadingPay(info *ReadingPay) error
func CreateUser ¶
func CreateUserCourse ¶
func CreateUserCourse(info *UserCourse) error
func CreateUserCourseCheckin ¶
func CreateUserCourseCheckin(info *UserCourseCheckin) error
func DelBookCatalog ¶
func DelBookCatalog(info *BookCatalog) error
func DelBookCatalogChapter ¶
func DelBookCatalogChapter(info *BookCatalogChapter) error
func DelChapter ¶
func DelCourseChannel ¶
func DelCourseChannel(info *CourseChannel) error
func DelMonthCourse ¶
func DelMonthCourse(info *MonthCourse) error
func DelMonthCourseBook ¶
func DelMonthCourseBook(info *MonthCourseBook) error
func DelMonthCourseCatalog ¶
func DelMonthCourseCatalog(info *MonthCourseCatalog) error
func DelMonthCourseCatalogChapter ¶
func DelMonthCourseCatalogChapter(info *MonthCourseCatalogChapter) error
func GetChapter ¶
func GetCourseCommentCount ¶
func GetCourseFromCourse ¶
func GetCourseMaxNum ¶
func GetCourseRemind ¶
func GetCourseRemind(info *CourseRemind) (bool, error)
func GetMonthCourseCatalog ¶
func GetMonthCourseCatalog(info *MonthCourseCatalog) (bool, error)
func GetMonthCourseCatalogAudio ¶
func GetMonthCourseCatalogAudio(info *MonthCourseCatalogAudio) (bool, error)
func GetReadingPay ¶
func GetReadingPay(info *ReadingPay) (bool, error)
func GetReadingPayWithStatus ¶
func GetReadingPayWithStatus(info *ReadingPay) (bool, error)
func GetUserCourseCheckFromUCM ¶
func GetUserCourseCheckFromUCM(info *UserCourseCheckin) (bool, error)
func GetUserCourseFromId ¶
func GetUserCourseFromId(info *UserCourse) (bool, error)
func GetUserCourseFromUser ¶
func GetUserCourseFromUser(info *UserCourse) (bool, error)
func GetUserFromOpenid ¶
func UpdateBook ¶
func UpdateBookCatalog ¶
func UpdateBookCatalog(info *BookCatalog) error
func UpdateChapter ¶
func UpdateChapterRemark ¶
func UpdateCoupon ¶
func UpdateCouponLock ¶
func UpdateCourse ¶
func UpdateCourseCommentReply ¶
func UpdateCourseCommentReply(info *CourseComment) error
func UpdateCourseCommentStatus ¶
func UpdateCourseCommentStatus(info *CourseComment) error
func UpdateCourseRemindEndTime ¶
func UpdateCourseRemindEndTime(info *CourseRemind) error
func UpdateCourseRemindUserNum ¶
func UpdateCourseRemindUserNum(info *CourseRemind) error
func UpdateMonthCourse ¶
func UpdateMonthCourse(info *MonthCourse) error
func UpdateMonthCourseBook ¶
func UpdateMonthCourseBook(info *MonthCourseBook) error
func UpdateMonthCourseCatalog ¶
func UpdateMonthCourseCatalog(info *MonthCourseCatalog) error
func UpdateReadingPayStatus ¶
func UpdateReadingPayStatus(info *ReadingPay) error
func UpdateReadingPayStatusFromOpenId ¶
func UpdateReadingPayStatusFromOpenId(info *ReadingPay) error
func UpdateReadingPayUserInfo ¶
func UpdateReadingPayUserInfo(info *ReadingPay) error
func UpdateReadingPayWxInfo ¶
func UpdateReadingPayWxInfo(info *ReadingPay) error
func UpdateUserAll ¶
func UpdateUserCourseRefundInfo ¶
func UpdateUserCourseRefundInfo(info *UserCourse) error
func UpdateUserCourseStatus ¶
func UpdateUserCourseStatus(info *UserCourse) error
func UpdateUserCourseTransactionRefundInfo ¶
func UpdateUserCourseTransactionRefundInfo(info *UserCourse) error
func UpdateUserInfo ¶
func UpdateUserWxInfo ¶
Types ¶
type Book ¶
type Book struct {
ID int64 `xorm:"pk autoincr" json:"id"`
BookName string `xorm:"not null default '' varchar(256)" json:"bookName"`
Author string `xorm:"not null default '' varchar(256)" json:"author"`
Abstract string `xorm:"not null default '' varchar(512)" json:"abstract"`
Cover string `xorm:"not null default '' varchar(256)" json:"cover"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetBookList ¶
type BookCatalog ¶
type BookCatalog struct {
ID int64 `xorm:"pk autoincr" json:"id"`
BookId int64 `xorm:"not null default 0 int index" json:"bookId"`
Title string `xorm:"not null default '' varchar(256)" json:"title"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetBookCatalogList ¶
func GetBookCatalogList(bookId int64) ([]BookCatalog, error)
type BookCatalogChapter ¶
type BookCatalogChapter struct {
ID int64 `xorm:"pk autoincr" json:"id"`
BookCatalogId int64 `xorm:"not null default 0 int index" json:"bookCatalogId"`
BookId int64 `xorm:"not null default 0 int" json:"bookId"`
ChapterId int64 `xorm:"not null default 0 int" json:"chapterId"`
IndexId int64 `xorm:"not null default 0 int index" json:"indexId"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetBookCatalogChapterList ¶
func GetBookCatalogChapterList(bookCatalogId int64) ([]BookCatalogChapter, error)
type Chapter ¶
type Chapter struct {
ID int64 `xorm:"pk autoincr" json:"id"`
BookId int64 `xorm:"not null default 0 int index" json:"bookId"`
IndexId int64 `xorm:"not null default 0 int index" json:"indexId"`
Title string `xorm:"not null default '' varchar(256)" json:"title"`
Cover string `xorm:"not null default '' varchar(256)" json:"cover"`
Content string `xorm:"text" json:"content"`
Remark string `xorm:"not null default '' varchar(128)" json:"remark"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetChapterList ¶
type Coupon ¶
type Coupon struct {
ID int64 `xorm:"pk autoincr" json:"id"`
Name string `xorm:"not null default '' varchar(128)" json:"name"`
Desc string `xorm:"not null default '' varchar(256)" json:"desc"`
CdKey string `xorm:"not null default '' varchar(128) unique" json:"cdkey"`
Amount int64 `xorm:"not null default 0 int" json:"amount"`
IfUse int64 `xorm:"not null default 0 int" json:"ifUse"`
LockTime int64 `xorm:"not null default 0 int" json:"lockTime"`
CourseType int64 `xorm:"not null default 0 int" json:"courseType"`
UserId int64 `xorm:"not null default 0 int" json:"userId"`
CreatedAt int64 `xorm:"not null default 0 int index" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetCouponList ¶
type Course ¶
type Course struct {
ID int64 `xorm:"pk autoincr" json:"id"`
CourseType int64 `xorm:"not null default 0 int index" json:"courseType"`
CourseNum int64 `xorm:"not null default 0 int index" json:"courseNum"`
Name string `xorm:"not null default '' varchar(128)" json:"name"`
Introduction string `xorm:"not null default '' varchar(512)" json:"introduction"`
Cover string `xorm:"not null default '' varchar(256)" json:"cover"`
StartTime int64 `xorm:"not null default 0 int index" json:"startTime"`
EndTime int64 `xorm:"not null default 0 int index" json:"endTime"`
Money int64 `xorm:"not null default 0 int" json:"money"`
HeadImg string `xorm:"not null default '' varchar(256)" json:"headImg"`
AbstractImg string `xorm:"not null default '' varchar(256)" json:"abstractImg"`
SignupSlogan string `xorm:"not null default '' varchar(256)" json:"signupSlogan"`
SuccessInfo string `xorm:"not null default '' varchar(1024)" json:"successInfo"`
AuditionName string `xorm:"not null default '' varchar(128)" json:"auditionName"`
AuditionUrl string `xorm:"not null default '' varchar(256)" json:"auditionUrl"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetCourseList ¶
func GetCourseListActive ¶
func GetNowCourseList ¶
type CourseBookCatalogDetail ¶
type CourseBookCatalogDetail struct {
MonthCourseCatalogChapter `xorm:"extends"`
Chapter `xorm:"extends"`
}
func GetCourseBookCatalogDetailList ¶
func GetCourseBookCatalogDetailList(monthCourseCatalogId int64) ([]CourseBookCatalogDetail, error)
func (CourseBookCatalogDetail) TableName ¶
func (CourseBookCatalogDetail) TableName() string
type CourseBookCatalogTime ¶
type CourseBookCatalogTime struct {
MonthCourseCatalog `xorm:"extends"`
Book `xorm:"extends"`
IfCheck int
}
func GetCourseBookCatalogListFromTime ¶
func GetCourseBookCatalogListFromTime(courseIds []int64, day int64) ([]CourseBookCatalogTime, error)
func GetCourseBookFromTime ¶
func GetCourseBookFromTime(courseId, day int64) ([]CourseBookCatalogTime, error)
func (CourseBookCatalogTime) TableName ¶
func (CourseBookCatalogTime) TableName() string
type CourseBookDetail ¶
type CourseBookDetail struct {
MonthCourseBook `xorm:"extends"`
Book `xorm:"extends"`
}
func GetCourseBookDetail ¶
func GetCourseBookDetail(courseId int64) ([]CourseBookDetail, error)
func (CourseBookDetail) TableName ¶
func (CourseBookDetail) TableName() string
type CourseChannel ¶
type CourseChannel struct {
ID int64 `xorm:"pk autoincr" json:"id"`
CourseType int64 `xorm:"not null default 0 int index" json:"courseType"`
Desc string `xorm:"not null default '' varchar(256)" json:"desc"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetCourseChannelList ¶
func GetCourseChannelList(courseType int64) ([]CourseChannel, error)
type CourseComment ¶
type CourseComment struct {
ID int64 `xorm:"pk autoincr" json:"id"`
UserId int64 `xorm:"not null default 0 int index" json:"userId"`
MonthCourseCatalogId int64 `xorm:"not null default 0 int index" json:"monthCourseCatalogId"`
Comment string `xorm:"not null default '' varchar(512)" json:"comment"`
Status int64 `xorm:"not null default 0 int index" json:"status"`
CreatedAtStr string `xorm:"not null default '' varchar(64)" json:"createdAtStr"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
ReplyUser string `xorm:"not null default '' varchar(128)" json:"replyUser"`
ReplyComment string `xorm:"not null default '' varchar(512)" json:"replyComment"`
ReplyAtStr string `xorm:"not null default '' varchar(64)" json:"replyAtStr"`
ReplyAt int64 `xorm:"not null default 0 int" json:"replydAt"`
}
type CourseRemind ¶
type CourseRemind struct {
ID int64 `xorm:"pk autoincr" json:"id"`
CourseId int64 `xorm:"not null default 0 int index" json:"courseId"`
RemindUserNum int64 `xorm:"not null default 0 int" json:"remindUserNum"`
EndTime int64 `xorm:"not null default 0 int" json:"endTime"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
type CourseType ¶
type CourseType struct {
ID int64 `xorm:"pk autoincr" json:"id"`
CourseType int64 `xorm:"not null default 0 int unique" json:"courseType"`
Desc string `xorm:"not null default '' varchar(256)" json:"desc"`
Introduction string `xorm:"not null default '' varchar(512)" json:"introduction"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetCourseTypeList ¶
func GetCourseTypeList() ([]CourseType, error)
type CourseUserList ¶
type CourseUserList struct {
UserCourse `xorm:"extends"`
User `xorm:"extends"`
}
func GetCourseUserList ¶
func GetCourseUserList(courseId, offset, status int64) ([]CourseUserList, error)
func GetUserCourseFromOpenId ¶
func GetUserCourseFromOpenId(openId string) ([]CourseUserList, error)
func (CourseUserList) TableName ¶
func (CourseUserList) TableName() string
type MonthCourse ¶
type MonthCourse struct {
ID int64 `xorm:"pk autoincr" json:"id"`
CourseId int64 `xorm:"not null default 0 int index" json:"courseId"`
IndexId int64 `xorm:"not null default 0 int index" json:"indexId"`
Year int64 `xorm:"not null default 0 int" json:"year"`
Month int64 `xorm:"not null default 0 int" json:"month"`
MonthEn string `xorm:"not null default '' varchar(64)" json:"monthEn"`
Title string `xorm:"not null default '' varchar(256)" json:"title"`
Introduction string `xorm:"not null default '' varchar(512)" json:"introduction"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetMonthCourseFromCourse ¶
func GetMonthCourseFromCourse(courseId int64) ([]MonthCourse, error)
func GetMonthCourseList ¶
func GetMonthCourseList(courseId int64) ([]MonthCourse, error)
type MonthCourseBook ¶
type MonthCourseBook struct {
ID int64 `xorm:"pk autoincr" json:"id"`
CourseId int64 `xorm:"not null default 0 int index" json:"courseId"`
MonthCourseId int64 `xorm:"not null default 0 int index" json:"monthCourseId"`
BookId int64 `xorm:"not null default 0 int" json:"bookId"`
IndexId int64 `xorm:"not null default 0 int index" json:"indexId"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetMonthCourseBookFromMonthCourse ¶
func GetMonthCourseBookFromMonthCourse(monthCourseId int64) ([]MonthCourseBook, error)
func GetMonthCourseBookList ¶
func GetMonthCourseBookList(courseId, monthCourseId int64) ([]MonthCourseBook, error)
type MonthCourseBooks ¶
type MonthCourseBooks struct {
MonthCourse `xorm:"extends"`
MonthCourseBook `xorm:"extends"`
}
func GetCourseBooks ¶
func GetCourseBooks(courseId int64) ([]MonthCourseBooks, error)
func (MonthCourseBooks) TableName ¶
func (MonthCourseBooks) TableName() string
type MonthCourseCatalog ¶
type MonthCourseCatalog struct {
ID int64 `xorm:"pk autoincr" json:"id"`
CourseId int64 `xorm:"not null default 0 int index" json:"courseId"`
MonthCourseId int64 `xorm:"not null default 0 int index" json:"monthCourseId"`
BookId int64 `xorm:"not null default 0 int index" json:"bookId"`
IndexId int64 `xorm:"not null default 0 int index" json:"indexId"`
Title string `xorm:"not null default '' varchar(256)" json:"title"`
TaskTime int64 `xorm:"not null default 0 int index" json:"taskTime"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetCourseCatalogList ¶
func GetCourseCatalogList(courseId, bookId int64) ([]MonthCourseCatalog, error)
func GetMonthCourseCatalogFromBook ¶
func GetMonthCourseCatalogFromBook(bookId int64) ([]MonthCourseCatalog, error)
func GetMonthCourseCatalogFromCourse ¶
func GetMonthCourseCatalogFromCourse(courseId, monthCourseId, bookId int64) ([]MonthCourseCatalog, error)
func GetMonthCourseCatalogList ¶
func GetMonthCourseCatalogList(courseId, monthCourseId, bookId int64) ([]MonthCourseCatalog, error)
type MonthCourseCatalogAudio ¶
type MonthCourseCatalogAudio struct {
ID int64 `xorm:"pk autoincr" json:"id"`
MonthCourseCatalogId int64 `xorm:"not null default 0 int index" json:"monthCourseCatalogId"`
AudioTitle string `xorm:"not null default '' varchar(128)" json:"AudioTitle"`
AudioUrl string `xorm:"not null default '' varchar(128)" json:"AudioUrl"`
AudioTime int64 `xorm:"not null default 0 int" json:"AudioTime"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetCourseCatalogAudioList ¶
func GetCourseCatalogAudioList(catalogId int64) ([]MonthCourseCatalogAudio, error)
func GetMonthCourseCatalogAudioFromCatalog ¶
func GetMonthCourseCatalogAudioFromCatalog(monthCourseCatalogId int64) ([]MonthCourseCatalogAudio, error)
type MonthCourseCatalogChapter ¶
type MonthCourseCatalogChapter struct {
ID int64 `xorm:"pk autoincr" json:"id"`
MonthCourseCatalogId int64 `xorm:"not null default 0 int index" json:"monthCourseCatalogId"`
BookId int64 `xorm:"not null default 0 int index" json:"bookId"`
ChapterId int64 `xorm:"not null default 0 int" json:"chapterId"`
IndexId int64 `xorm:"not null default 0 int index" json:"indexId"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetMonthCourseCatalogChapterFromCatalog ¶
func GetMonthCourseCatalogChapterFromCatalog(monthCourseCatalogId int64) ([]MonthCourseCatalogChapter, error)
func GetMonthCourseCatalogChapterList ¶
func GetMonthCourseCatalogChapterList(monthCourseCatalogId int64) ([]MonthCourseCatalogChapter, error)
type ReadingPay ¶
type ReadingPay struct {
ID int64 `xorm:"pk autoincr" json:"id"`
AppId string `xorm:"not null default '' varchar(128)" json:"appId"`
OpenId string `xorm:"not null default '' varchar(128) unique" json:"openId"`
Name string `xorm:"not null default '' varchar(256)" json:"name"`
AvatarUrl string `xorm:"not null default '' varchar(256)" json:"avatarUrl"`
RealName string `xorm:"not null default '' varchar(256)" json:"realName"`
Phone string `xorm:"not null default '' varchar(64)" json:"phone"`
Wechat string `xorm:"not null default '' varchar(64)" json:"tempUri"`
Course int64 `xorm:"not null default 0 int" json:"course"`
Number int64 `xorm:"not null default 0 int index" json:"number"`
Money int64 `xorm:"not null default 0 int" json:"money"`
Status int64 `xorm:"not null default 0 int index" json:"status"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int index" json:"-"`
}
func GetReadingPayFromTime ¶
func GetReadingPayFromTime(fromTime int64) ([]ReadingPay, error)
type RefundInfo ¶
type User ¶
type User struct {
ID int64 `xorm:"pk autoincr" json:"id"`
AppId string `xorm:"not null default '' varchar(128)" json:"appId"`
OpenId string `xorm:"not null default '' varchar(128) unique" json:"openId"`
Name string `xorm:"not null default '' varchar(256)" json:"name"`
AvatarUrl string `xorm:"not null default '' varchar(256)" json:"avatarUrl"`
RealName string `xorm:"not null default '' varchar(256)" json:"realName"`
Phone string `xorm:"not null default '' varchar(64)" json:"phone"`
Wechat string `xorm:"not null default '' varchar(64)" json:"tempUri"`
IfNotRemind int64 `xorm:"not null default 0 int" json:"ifNotRemind"`
RemindTime int64 `xorm:"not null default 0 int" json:"remindTime"`
Source int64 `xorm:"not null default 0 int index" json:"source"`
CreatedAt int64 `xorm:"not null default 0 int index" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int index" json:"-"`
}
type UserCourse ¶
type UserCourse struct {
ID int64 `xorm:"pk autoincr" json:"id"`
UserId int64 `xorm:"not null default 0 int index" json:"userId"`
CourseId int64 `xorm:"not null default 0 int index" json:"courseId"`
CourseType int64 `xorm:"not null default 0 int index" json:"courseType"`
Money int64 `xorm:"not null default 0 int" json:"money"`
Status int64 `xorm:"not null default 0 int index" json:"status"`
PayTime int64 `xorm:"not null default 0 int index" json:"payTime"`
Source int64 `xorm:"not null default 0 int index" json:"source"`
OutTradeNo string `xorm:"not null default '' varchar(128)" json:"-"`
TransactionId string `xorm:"not null default '' varchar(128)" json:"-"`
OutRefundNo string `xorm:"not null default '' varchar(128)" json:"-"`
RefundId string `xorm:"not null default '' varchar(128)" json:"-"`
RefundFee int64 `xorm:"not null default 0 int" json:"refundFee"`
RefundWay int64 `xorm:"not null default 0 int" json:"refundWay"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
func GetUserCourseFromTime ¶
func GetUserCourseFromTime(fromTime int64) ([]UserCourse, error)
type UserCourseAttendance ¶
type UserCourseAttendance struct {
UserCourseCheckin `xorm:"extends"`
MonthCourseCatalog `xorm:"extends"`
}
func GetUserCourseCheckList ¶
func GetUserCourseCheckList(userId, courseId int64) ([]UserCourseAttendance, error)
func (UserCourseAttendance) TableName ¶
func (UserCourseAttendance) TableName() string
type UserCourseCheckin ¶
type UserCourseCheckin struct {
ID int64 `xorm:"pk autoincr" json:"id"`
UserId int64 `xorm:"not null default 0 int unique(user_course)" json:"userId"`
CourseId int64 `xorm:"not null default 0 int unique(user_course)" json:"courseId"`
MonthCourseCatalogId int64 `xorm:"not null default 0 int unique(user_course)" json:"monthCourseCatalogId"`
CreatedAt int64 `xorm:"not null default 0 int" json:"createdAt"`
UpdatedAt int64 `xorm:"not null default 0 int" json:"-"`
}
type UserCourseComment ¶
type UserCourseComment struct {
CourseComment `xorm:"extends" json:"courseComment"`
User `xorm:"extends" json:"user"`
}
func GetUserCourseComment ¶
func GetUserCourseComment(userId, monthCourseCatalogId int64) ([]UserCourseComment, error)
func (UserCourseComment) TableName ¶
func (UserCourseComment) TableName() string
type UserCourseCommentDetail ¶
type UserCourseCommentDetail struct {
CourseComment `xorm:"extends" json:"courseComment"`
User `xorm:"extends" json:"user"`
MonthCourseCatalog `xorm:"extends" json:"monthCourseCatalog"`
}
func GetCourseCommentList ¶
func GetCourseCommentList(status, offset, num int64) ([]UserCourseCommentDetail, error)
func (UserCourseCommentDetail) TableName ¶
func (UserCourseCommentDetail) TableName() string
type UserCourseDetail ¶
type UserCourseDetail struct {
UserCourse `xorm:"extends" json:"userCourse"`
User `xorm:"extends" json:"user"`
Course `xorm:"extends" json:"course"`
}
func GetUserCourse ¶
func GetUserCourse(openId string) ([]UserCourseDetail, error)
func GetUserCourseDataStatistics ¶
func GetUserCourseDataStatistics(courseType, source, startTime, endTime int64) ([]UserCourseDetail, error)
func GetUserCourseFromStatus ¶
func GetUserCourseFromStatus(openId string, status int64) ([]UserCourseDetail, error)
func (UserCourseDetail) TableName ¶
func (UserCourseDetail) TableName() string
type UserCourseList ¶
type UserCourseList struct {
UserCourse `xorm:"extends"`
Course `xorm:"extends"`
}
func GetUserCourseList ¶
func GetUserCourseList(userId, status int64) ([]UserCourseList, error)
func (UserCourseList) TableName ¶
func (UserCourseList) TableName() string
Click to show internal directories.
Click to hide internal directories.