| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- package models
- import "time"
- // UserData 用户数据表
- type UserData struct {
- ID uint `gorm:"primarykey;autoIncrement" json:"id"`
- CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"`
- UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"`
- DeletedAt *time.Time `gorm:"comment:删除时间" json:"deleted_at"`
- IsDeleted int `gorm:"comment:是否删除 1:是 0:否" json:"is_deleted"`
- // 基本信息
- UserID string `gorm:"type:varchar(255);comment:用户ID" json:"user_id"`
- Name string `gorm:"type:varchar(255);comment:姓名" json:"name"`
- LogicDelete string `gorm:"type:varchar(50);comment:逻辑删除标记" json:"logic_delete"`
- // 组织信息
- OrgCode string `gorm:"type:varchar(255);comment:组织代码" json:"org_code"`
- OrgName string `gorm:"type:varchar(500);comment:组织名称" json:"org_name"`
- OrgPath string `gorm:"type:text;comment:组织路径" json:"org_path"`
- OrgPathCN string `gorm:"type:text;comment:组织路径中文" json:"org_path_cn"`
- OrgInfos string `gorm:"type:text;comment:组织信息" json:"org_infos"`
- // 用户详情
- UserCode string `gorm:"type:varchar(255);comment:用户代码" json:"user_code"`
- Sex string `gorm:"type:varchar(10);comment:性别" json:"sex"`
- Birthday string `gorm:"type:varchar(50);comment:生日" json:"birthday"`
- // 身份信息
- IdentificationNumber string `gorm:"type:varchar(50);comment:身份证号" json:"identification_number"`
- // 籍贯民族信息
- Nation string `gorm:"type:varchar(100);comment:民族" json:"nation"`
- NationCode string `gorm:"type:varchar(50);comment:民族代码" json:"nation_code"`
- NativePlace string `gorm:"type:varchar(255);comment:籍贯" json:"native_place"`
- // 教育信息
- EducationBackground string `gorm:"type:varchar(255);comment:教育背景" json:"education_background"`
- EducationBackgroundCode string `gorm:"type:varchar(50);comment:教育背景代码" json:"education_background_code"`
- // 专业技术职务
- ProfessionalAndTechnicalPositions string `gorm:"type:varchar(255);comment:专业技术职务" json:"professional_and_technical_positions"`
- ProfessionalAndTechnicalPositionsCode string `gorm:"type:varchar(50);comment:专业技术职务代码" json:"professional_and_technical_positions_code"`
- // 政治面貌
- PoliticCountenance string `gorm:"type:varchar(255);comment:政治面貌" json:"politic_countenance"`
- PoliticCountenanceCode string `gorm:"type:varchar(50);comment:政治面貌代码" json:"politic_countenance_code"`
- // 职位信息
- PositionName string `gorm:"type:varchar(255);comment:职位名称" json:"position_name"`
- PositoinCode string `gorm:"type:varchar(50);comment:职位代码" json:"positoin_code"` // 注意:原数据库拼写为 positoin
- // 入职信息
- OnBoardDay string `gorm:"type:varchar(50);comment:入职日期" json:"on_board_day"`
- // 联系方式
- ContactNumber string `gorm:"type:varchar(50);comment:联系电话" json:"contact_number"`
- Mobile string `gorm:"type:varchar(50);comment:手机号" json:"mobile"`
- // 其他字段
- UserStatus string `gorm:"type:varchar(50);comment:用户状态" json:"user_status"`
- FZJ string `gorm:"type:varchar(255);comment:分组" json:"fzj"`
- FZJDm string `gorm:"type:varchar(50);comment:分组代码" json:"fzj_dm"`
- HrRylb string `gorm:"type:varchar(255);comment:人力资源人员类别" json:"hr_rylb"`
- // 4A账号相关
- AccountID string `gorm:"type:varchar(100);comment:4A账号ID" json:"accountID"`
- // 系统字段(这些字段如果存在会与BaseModel冲突,注释掉保留作为备用)
- // DbCreatedAt string `gorm:"type:varchar(50);comment:数据库创建时间" json:"db_created_at"`
- // RowNumber int `gorm:"comment:行号" json:"row_number"`
- }
- // TableName 指定表名
- func (UserData) TableName() string {
- return "user_data"
- }
|