You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
4.3 KiB
53 lines
4.3 KiB
package testpage
|
|
|
|
//企业微信架构
|
|
|
|
//分厂于工段
|
|
//分厂
|
|
type BranchFactory struct {
|
|
Id int64 `json:"id" gorm:"column:bf_id;type:bigint(20);;primaryKey;unique;not null;autoIncrement;index"`
|
|
Name string `json:"name" gorm:"column:bf_name;type:varchar(30);not null;comment:分厂名称"` //'分厂名称',
|
|
Set int8 `json:"state" gorm:"column:bf_set;type:tinyint(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"` //'状态(1:启用;2:禁用;3:删除)',
|
|
Uid int64 `json:"uid" gorm:"column:bf_uid;type:bigint(20) unsigned;default:0;not null;comment:创建人"` //'创建人',
|
|
Time int64 `json:"time" gorm:"column:bf_time;type:bigint(20) unsigned;default:0;not null;comment:添加时间"` //'0',
|
|
Attribute int8 `json:"attribute" gorm:"column:bf_attribute;type:tinyint(1) unsigned;default:1;not null;comment:属性(1:私有;2:共享)"` //'属性(1:私有;2:共享)',
|
|
Group int64 `json:"group" gorm:"column:bf_group;type:bigint(20) unsigned;default:0;not null;comment:集团公司"` //'集团公司',
|
|
WechatId int `json:"wechatid" gorm:"column:bf_wechat_id;type:int(4) unsigned;default:0;not null;comment:对照微信id"` //'对照微信id',
|
|
}
|
|
|
|
//分厂关联
|
|
type BranchFactoryHasMany struct {
|
|
Id int64 `json:"id" gorm:"column:bf_id;type:bigint(20);;primaryKey;unique;not null;autoIncrement;index"`
|
|
Name string `json:"name" gorm:"column:bf_name;type:varchar(30);not null;comment:分厂名称"` //'分厂名称',
|
|
Set int8 `json:"state" gorm:"column:bf_set;type:tinyint(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"` //'状态(1:启用;2:禁用;3:删除)',
|
|
Uid int64 `json:"uid" gorm:"column:bf_uid;type:bigint(20) unsigned;default:0;not null;comment:创建人"` //'创建人',
|
|
Time int64 `json:"time" gorm:"column:bf_time;type:bigint(20) unsigned;default:0;not null;comment:添加时间"` //'0',
|
|
Attribute int8 `json:"attribute" gorm:"column:bf_attribute;type:tinyint(1) unsigned;default:1;not null;comment:属性(1:私有;2:共享)"` //'属性(1:私有;2:共享)',
|
|
Group int64 `json:"group" gorm:"column:bf_group;type:bigint(20) unsigned;default:0;not null;comment:集团公司"` //'集团公司',
|
|
WechatId int `json:"wechatid" gorm:"column:bf_wechat_id;type:int(4) unsigned;default:0;not null;comment:对照微信id"` //'对照微信id',
|
|
WorkshopSectionStruct []WorkShopsection
|
|
}
|
|
|
|
//工段
|
|
type WorkShopsection struct {
|
|
Id int64 `json:"id" gorm:"column:ws_id;type:bigint(20);;primaryKey;unique;not null;autoIncrement;index"`
|
|
Name string `json:"name" gorm:"column:ws_name;type:varchar(50);not null;comment:工段名称"` //'工段名称',
|
|
Set int8 `json:"state" gorm:"column:ws_set;type:tinyint(1) unsigned;default:1;not null;comment:状态(1:启用;2:禁用;3:删除)"` //'状态(1:启用;2:禁用;3:删除)',
|
|
DepartmentId int64 `json:"departmentid" gorm:"column:ws_bf_id;type:bigint(20) unsigned;default:0;not null;comment:归属分厂"` //'归属分厂',
|
|
Time int64 `json:"time" gorm:"column:ws_time;type:bigint(20) unsigned;default:0;not null;comment:创建时间"` //'创建时间',
|
|
SysUid int64 `json:"sysuid" gorm:"column:ws_sys_uid;type:bigint(50) unsigned;default:0;not null;comment:创建人"` //'创建人',
|
|
EiteTime int64 `json:"eitetime" gorm:"column:ws_eite_time;type:bigint(20) unsigned;default:0;not null;comment:修改时间"` // '修改时间',
|
|
Group int64 `json:"group" gorm:"column:ws_group;type:bigint(10) unsigned;default:0;not null;comment:归属集团"` //'归属集团',
|
|
}
|
|
|
|
func (BranchFactory *BranchFactory) TableName() string {
|
|
return "branch_factory"
|
|
}
|
|
|
|
func (BranchFactoryHasMany *BranchFactoryHasMany) TableName() string {
|
|
return "branch_factory"
|
|
}
|
|
|
|
func (WorkShopsection *WorkShopsection) TableName() string {
|
|
return "work_shopsection"
|
|
}
|
|
|