2021-09-28 11:47:19 +08:00
|
|
|
|
package model
|
|
|
|
|
|
2022-01-06 22:02:09 +08:00
|
|
|
|
// SysDepartment 部门数据模型
|
2021-09-28 11:47:19 +08:00
|
|
|
|
type SysDepartment struct {
|
|
|
|
|
Model
|
|
|
|
|
ModelTenant
|
2022-01-06 17:11:57 +08:00
|
|
|
|
ParentID uint64 `gorm:"column:parent_id;type:int;default:0;comment:父级ID" json:"-"`
|
|
|
|
|
Name string `gorm:"column:name;type:varchar(20);default:'';comment:部门名称" json:"name"`
|
2022-01-07 16:12:43 +08:00
|
|
|
|
Contact string `gorm:"column:contact;type:varchar(20);default:'';comment:联系人" json:"contact"`
|
2022-01-06 17:11:57 +08:00
|
|
|
|
ContactMobile string `gorm:"column:contact_mobile;type:varchar(15);default:'';comment:联系方式" json:"contact_mobile"`
|
2022-01-06 22:02:09 +08:00
|
|
|
|
Status int `gorm:"column:status;type:tinyint(1);default:1;comment:状态(1:正常,2:禁用)" json:"status"`
|
2022-01-06 17:11:57 +08:00
|
|
|
|
Remark string `gorm:"column:remark;type:varchar(255);default:'';comment:备注信息" json:"remark"`
|
2021-09-28 11:47:19 +08:00
|
|
|
|
ModelDeleted
|
|
|
|
|
ModelAt
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *SysDepartment) TableName() string {
|
|
|
|
|
return m.NewTableName("sys_department")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewSysDepartment() *SysDepartment {
|
|
|
|
|
return &SysDepartment{}
|
|
|
|
|
}
|