增加个人办公模块
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// BackendErpContact 全局通讯录表 yz_backend_contact
|
||||
// 与组织架构联动,支持内部员工(自动同步)和外部联系人
|
||||
type BackendErpContact struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Tid uint64 `orm:"column(tid)" json:"tid"`
|
||||
EmployeeID *uint64 `orm:"column(employee_id);null" json:"employee_id"`
|
||||
OrgID *uint64 `orm:"column(org_id);null" json:"org_id"`
|
||||
ContactType int8 `orm:"column(contact_type);default(1)" json:"contact_type"`
|
||||
ContactName string `orm:"column(contact_name);size(64)" json:"contact_name"`
|
||||
Gender int8 `orm:"column(gender);default(0)" json:"gender"`
|
||||
Phone *string `orm:"column(phone);size(20);null" json:"phone"`
|
||||
WorkPhone *string `orm:"column(work_phone);size(20);null" json:"work_phone"`
|
||||
Email *string `orm:"column(email);size(128);null" json:"email"`
|
||||
Wechat *string `orm:"column(wechat);size(64);null" json:"wechat"`
|
||||
Avatar *string `orm:"column(avatar);size(512);null" json:"avatar"`
|
||||
CompanyName *string `orm:"column(company_name);size(128);null" json:"company_name"`
|
||||
DeptName *string `orm:"column(dept_name);size(128);null" json:"dept_name"`
|
||||
PositionID *uint64 `orm:"column(position_id);null" json:"position_id"`
|
||||
PositionTitle *string `orm:"column(position_title);size(100);null" json:"position_title"`
|
||||
Address *string `orm:"column(address);size(512);null" json:"address"`
|
||||
Remark *string `orm:"column(remark);size(512);null" json:"remark"`
|
||||
IsStarred int8 `orm:"column(is_starred);default(0)" json:"is_starred"`
|
||||
Sort uint `orm:"column(sort);default(0)" json:"sort"`
|
||||
Status int8 `orm:"column(status);default(1)" json:"status"`
|
||||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
|
||||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
}
|
||||
|
||||
func (m *BackendErpContact) TableName() string {
|
||||
return "yz_backend_contact"
|
||||
}
|
||||
+6
-6
@@ -2,7 +2,7 @@ package models
|
||||
|
||||
import "time"
|
||||
|
||||
// BackendErpOrganization 组织架构表 yz_backend_erp_organization
|
||||
// BackendErpOrganization 全局组织架构表 yz_backend_organization
|
||||
type BackendErpOrganization struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Tid uint64 `orm:"column(tid)" json:"tid"`
|
||||
@@ -21,10 +21,10 @@ type BackendErpOrganization struct {
|
||||
|
||||
// TableName 自定义表名
|
||||
func (m *BackendErpOrganization) TableName() string {
|
||||
return "yz_backend_erp_organization"
|
||||
return "yz_backend_organization"
|
||||
}
|
||||
|
||||
// BackendErpEmployee 员工信息表 yz_backend_erp_employee
|
||||
// BackendErpEmployee 全局员工信息表 yz_backend_employee
|
||||
type BackendErpEmployee struct {
|
||||
ID uint `orm:"column(id);pk;auto" json:"id"`
|
||||
Tid *int `orm:"column(tid);null" json:"tid"`
|
||||
@@ -50,10 +50,10 @@ type BackendErpEmployee struct {
|
||||
|
||||
// TableName 自定义表名
|
||||
func (m *BackendErpEmployee) TableName() string {
|
||||
return "yz_backend_erp_employee"
|
||||
return "yz_backend_employee"
|
||||
}
|
||||
|
||||
// BackendErpPosition 职位表 yz_backend_erp_position
|
||||
// BackendErpPosition 全局职位表 yz_backend_position
|
||||
type BackendErpPosition struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Tid uint64 `orm:"column(tid)" json:"tid"`
|
||||
@@ -69,5 +69,5 @@ type BackendErpPosition struct {
|
||||
|
||||
// TableName 自定义表名
|
||||
func (m *BackendErpPosition) TableName() string {
|
||||
return "yz_backend_erp_position"
|
||||
return "yz_backend_position"
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ func Init(_ string) {
|
||||
new(BackendErpOrganization),
|
||||
new(BackendErpEmployee),
|
||||
new(BackendErpPosition),
|
||||
new(BackendErpContact),
|
||||
new(BackendApprovalFlow),
|
||||
new(BackendApprovalRecord),
|
||||
new(BackendReimbursement),
|
||||
|
||||
Reference in New Issue
Block a user