models

package
v0.0.0-...-bdd2f32 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	COMMENT_STATUS_SHOW   = 1
	COMMENT_STATUS_IGNORE = 2
)

Variables

This section is empty.

Functions

func CreateBook

func CreateBook(info *Book) error

func CreateBookCatalog

func CreateBookCatalog(info *BookCatalog) error

func CreateBookCatalogChapterList

func CreateBookCatalogChapterList(list []BookCatalogChapter) error

func CreateChapter

func CreateChapter(info *Chapter) error

func CreateCouponList

func CreateCouponList(list []Coupon) error

func CreateCourse

func CreateCourse(info *Course) error

-------------- course ---------------

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 CreateUser(info *User) error

func CreateUserCourse

func CreateUserCourse(info *UserCourse) error

func CreateUserCourseCheckin

func CreateUserCourseCheckin(info *UserCourseCheckin) error

func DelBook

func DelBook(info *Book) error

func DelBookCatalog

func DelBookCatalog(info *BookCatalog) error

func DelBookCatalogChapter

func DelBookCatalogChapter(info *BookCatalogChapter) error

func DelChapter

func DelChapter(info *Chapter) error

func DelCourse

func DelCourse(info *Course) error

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 GetBook

func GetBook(info *Book) (bool, error)

func GetChapter

func GetChapter(info *Chapter) (bool, error)

func GetCoupon

func GetCoupon(info *Coupon) (bool, error)

func GetCourse

func GetCourse(info *Course) (bool, error)

func GetCourseCommentCount

func GetCourseCommentCount() (int64, error)

func GetCourseFromCourse

func GetCourseFromCourse(info *Course) (bool, error)

func GetCourseMaxNum

func GetCourseMaxNum(info *Course) (bool, error)

func GetCourseRemind

func GetCourseRemind(info *CourseRemind) (bool, error)

func GetMonthCourseBookUnlock

func GetMonthCourseBookUnlock(courseId int64) (map[int64]int, 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 GetUser

func GetUser(info *User) (bool, error)

func GetUserCourseCheckFromUCM

func GetUserCourseCheckFromUCM(info *UserCourseCheckin) (bool, error)

func GetUserCourseCheckinCount

func GetUserCourseCheckinCount(userId, courseId int64) (int64, error)

func GetUserCourseFromId

func GetUserCourseFromId(info *UserCourse) (bool, error)

func GetUserCourseFromUser

func GetUserCourseFromUser(info *UserCourse) (bool, error)

func GetUserFromOpenid

func GetUserFromOpenid(info *User) (bool, error)

func InitDB

func InitDB(cfg *config.Config)

func UpdateBook

func UpdateBook(info *Book) error

func UpdateBookCatalog

func UpdateBookCatalog(info *BookCatalog) error

func UpdateChapter

func UpdateChapter(info *Chapter) error

func UpdateChapterRemark

func UpdateChapterRemark(info *Chapter) error

func UpdateCoupon

func UpdateCoupon(info *Coupon) error

func UpdateCouponLock

func UpdateCouponLock(info *Coupon) error

func UpdateCourse

func UpdateCourse(info *Course) error

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 UpdateUserAll(info *User) error

func UpdateUserCourseRefundInfo

func UpdateUserCourseRefundInfo(info *UserCourse) error

func UpdateUserCourseStatus

func UpdateUserCourseStatus(info *UserCourse) error

func UpdateUserCourseTransactionRefundInfo

func UpdateUserCourseTransactionRefundInfo(info *UserCourse) error

func UpdateUserInfo

func UpdateUserInfo(info *User) error

func UpdateUserWxInfo

func UpdateUserWxInfo(info *User) error

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

func GetBookList() ([]Book, error)

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

func GetChapterList(bookId int64) ([]Chapter, error)

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

func GetCouponList(offset, limit int) ([]Coupon, error)

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 GetCourseList() ([]Course, error)

func GetCourseListActive

func GetCourseListActive(t int64) ([]Course, error)

func GetNowCourseList

func GetNowCourseList() ([]Course, error)

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 RefundInfo struct {
	ID        int64 `xorm:"pk autoincr" json:"id"`
	CreatedAt int64 `xorm:"not null default 0 int index" json:"createdAt"`
	UpdatedAt int64 `xorm:"not null default 0 int index" json:"-"`
}

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

Jump to

Keyboard shortcuts

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