model

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameAbandonCode = "abandon_code"
View Source
const TableNameCourseSwapRequest = "course_swap_request"
View Source
const TableNameProject = "project"
View Source
const TableNameTask = "task"
View Source
const TableNameUser = "user"
View Source
const TableNameUserDept = "user_dept"
View Source
const TableNameUserDeptAssoc = "user_dept_assoc"
View Source
const TableNameUserJob = "user_job"
View Source
const TableNameUserProjectAssoc = "user_project_assoc"
View Source
const TableNameUserRole = "user_role"
View Source
const TableNameUserRoleAssoc = "user_role_assoc"
View Source
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>

func (*Project) TableName added in v0.0.6

func (*Project) TableName() string

TableName Project's table name

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>

func (*Task) TableName

func (*Task) TableName() string

TableName Task's table name

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>

func (*User) TableName

func (*User) TableName() string

TableName User's table name

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>

func (*UserDept) TableName

func (*UserDept) TableName() string

TableName UserDept's table name

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>

func (*UserJob) TableName

func (*UserJob) TableName() string

TableName UserJob's table name

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>

func (*UserRole) TableName added in v0.0.6

func (*UserRole) TableName() string

TableName UserRole's table name

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

Jump to

Keyboard shortcuts

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