Documentation
¶
Index ¶
Constants ¶
const TableNameAbandonCode = "abandon_code"
const TableNameCourseSwapRequest = "course_swap_request"
const TableNameProject = "project"
const TableNameTask = "task"
const TableNameUser = "user"
const TableNameUserDept = "user_dept"
const TableNameUserDeptAssoc = "user_dept_assoc"
const TableNameUserJob = "user_job"
const TableNameUserProjectAssoc = "user_project_assoc"
const TableNameUserRole = "user_role"
const TableNameUserRoleAssoc = "user_role_assoc"
const TableNameUserRolePermissionAssoc = "user_role_permission_assoc"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbandonCode ¶
type AbandonCode struct {
Idx1 int32 `gorm:"column:idx1;primaryKey;autoIncrement:true;comment:The primary key of the table" json:"idx1"` // The primary key of the table
Col1 string `gorm:"column:col1;not null" json:"col1"`
Idx2 int32 `gorm:"column:idx2;not null" json:"idx2"`
Idx3 int32 `gorm:"column:idx3;not null" json:"idx3"`
}
AbandonCode CURD生成模板
func (*AbandonCode) TableName ¶
func (*AbandonCode) TableName() string
TableName AbandonCode's table name
type CourseSwapRequest ¶
type CourseSwapRequest struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
SrcTeacher string `gorm:"column:src_teacher;not null" json:"src_teacher"`
SrcDate time.Time `gorm:"column:src_date;not null" json:"src_date"`
SrcCourseNum int32 `gorm:"column:src_course_num;not null" json:"src_course_num"`
SrcCourse string `gorm:"column:src_course;not null" json:"src_course"`
SrcClass string `gorm:"column:src_class;not null" json:"src_class"`
DstTeacher string `gorm:"column:dst_teacher;not null" json:"dst_teacher"`
DstDate time.Time `gorm:"column:dst_date;not null" json:"dst_date"`
DstCourseNum int32 `gorm:"column:dst_course_num;not null" json:"dst_course_num"`
DstCourse string `gorm:"column:dst_course;not null" json:"dst_course"`
DstClass string `gorm:"column:dst_class;not null" json:"dst_class"`
CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP" json:"create_time"`
Status int32 `gorm:"column:status;not null" json:"status"`
}
CourseSwapRequest mapped from table <course_swap_request>
func (*CourseSwapRequest) TableName ¶
func (*CourseSwapRequest) TableName() string
TableName CourseSwapRequest's table name
type Project ¶ added in v0.0.6
type Project struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP" json:"update_time"`
UpdateUser int32 `gorm:"column:update_user;not null" json:"update_user"`
ProjName string `gorm:"column:proj_name;not null" json:"proj_name"`
LastEditFrom string `gorm:"column:last_edit_from;not null" json:"last_edit_from"`
}
Project mapped from table <project>
type Task ¶
type Task struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
ParentID int32 `gorm:"column:parent_id;not null" json:"parent_id"`
PrevID int32 `gorm:"column:prev_id;not null" json:"prev_id"`
Task string `gorm:"column:task;not null" json:"task"`
Status int32 `gorm:"column:status;not null" json:"status"`
Estimate int32 `gorm:"column:estimate;not null" json:"estimate"`
Start time.Time `gorm:"column:start;default:CURRENT_TIMESTAMP" json:"start"`
End time.Time `gorm:"column:end;default:CURRENT_TIMESTAMP" json:"end"`
Desc string `gorm:"column:desc;not null" json:"desc"`
Metadata string `gorm:"column:metadata;not null" json:"metadata"`
CreateTime time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP" json:"create_time"`
}
Task mapped from table <task>
type User ¶
type User struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP" json:"update_time"`
UpdateUser int32 `gorm:"column:update_user;not null" json:"update_user"`
UserName string `gorm:"column:user_name;not null" json:"user_name"`
Password string `gorm:"column:password;not null" json:"password"`
LastEditFrom string `gorm:"column:last_edit_from;not null" json:"last_edit_from"`
}
User mapped from table <user>
type UserDept ¶
type UserDept struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP" json:"update_time"`
UpdateUser int32 `gorm:"column:update_user;not null" json:"update_user"`
DeptPath string `gorm:"column:dept_path;not null" json:"dept_path"`
DeptName string `gorm:"column:dept_name;not null" json:"dept_name"`
}
UserDept mapped from table <user_dept>
type UserDeptAssoc ¶
type UserDeptAssoc struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP" json:"update_time"`
UpdateUser int32 `gorm:"column:update_user;not null" json:"update_user"`
UserID int32 `gorm:"column:user_id;not null" json:"user_id"`
DeptID int32 `gorm:"column:dept_id;not null" json:"dept_id"`
JobID int32 `gorm:"column:job_id;not null" json:"job_id"`
}
UserDeptAssoc mapped from table <user_dept_assoc>
func (*UserDeptAssoc) TableName ¶
func (*UserDeptAssoc) TableName() string
TableName UserDeptAssoc's table name
type UserJob ¶
type UserJob struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP" json:"update_time"`
UpdateUser int32 `gorm:"column:update_user;not null" json:"update_user"`
JobName string `gorm:"column:job_name;not null" json:"job_name"`
}
UserJob mapped from table <user_job>
type UserProjectAssoc ¶ added in v0.0.6
type UserProjectAssoc struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
UserID int32 `gorm:"column:user_id;not null" json:"user_id"`
ProjID int32 `gorm:"column:proj_id;not null" json:"proj_id"`
}
UserProjectAssoc mapped from table <user_project_assoc>
func (*UserProjectAssoc) TableName ¶ added in v0.0.6
func (*UserProjectAssoc) TableName() string
TableName UserProjectAssoc's table name
type UserRole ¶ added in v0.0.6
type UserRole struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP" json:"update_time"`
UpdateUser int32 `gorm:"column:update_user;not null" json:"update_user"`
ProjID int32 `gorm:"column:proj_id;not null" json:"proj_id"`
RoleName string `gorm:"column:role_name;not null" json:"role_name"`
IsDefault int32 `gorm:"column:is_default;not null" json:"is_default"`
}
UserRole mapped from table <user_role>
type UserRoleAssoc ¶ added in v0.0.6
type UserRoleAssoc struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
UserID int32 `gorm:"column:user_id;not null" json:"user_id"`
RoleID int32 `gorm:"column:role_id;not null" json:"role_id"`
}
UserRoleAssoc mapped from table <user_role_assoc>
func (*UserRoleAssoc) TableName ¶ added in v0.0.6
func (*UserRoleAssoc) TableName() string
TableName UserRoleAssoc's table name
type UserRolePermissionAssoc ¶ added in v0.0.6
type UserRolePermissionAssoc struct {
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
CreateUser int32 `gorm:"column:create_user;not null" json:"create_user"`
RoleID int32 `gorm:"column:role_id;not null" json:"role_id"`
Action string `gorm:"column:action;not null" json:"action"`
PathPattern string `gorm:"column:path_pattern;not null" json:"path_pattern"`
}
UserRolePermissionAssoc mapped from table <user_role_permission_assoc>
func (*UserRolePermissionAssoc) TableName ¶ added in v0.0.6
func (*UserRolePermissionAssoc) TableName() string
TableName UserRolePermissionAssoc's table name