mirror of
https://shylinux.com/x/education
synced 2025-05-09 07:38:10 +08:00
36 lines
839 B
Go
36 lines
839 B
Go
package model
|
|
|
|
import "shylinux.com/x/mysql-story/src/db"
|
|
|
|
const (
|
|
UID = "uid"
|
|
NAME = "name"
|
|
TYPE = "type"
|
|
ROLE = "role"
|
|
TITLE = "title"
|
|
CONTENT = "content"
|
|
USER_UID = "user_uid"
|
|
USER_COURSE_ROLE = "user_course_role"
|
|
COURSE_UID = "course_uid"
|
|
COURSE_NAME = "course_name"
|
|
COURSE_TYPE = "course_type"
|
|
LESSON_UID = "lesson_uid"
|
|
SCHOOL_UID = "school_uid"
|
|
CITY_UID = "city_uid"
|
|
)
|
|
|
|
type UserCourse struct {
|
|
db.ModelUserPlace
|
|
CourseUID string `gorm:"type:char(32);index"`
|
|
}
|
|
type Course struct {
|
|
db.ModelPlace
|
|
SchoolUID string `gorm:"type:char(32);index"`
|
|
}
|
|
type Lesson struct {
|
|
db.ModelContent
|
|
CourseUID string `gorm:"type:char(32);index"`
|
|
}
|
|
|
|
func init() { db.CmdModels("", &UserCourse{}, &Course{}, &Lesson{}) }
|