27 lines
1.6 KiB
Go
27 lines
1.6 KiB
Go
package models
|
||
|
||
import "time"
|
||
|
||
// Tenant 租户表 yz_tenant
|
||
type Tenant struct {
|
||
ID uint64 `orm:"column(id);pk;auto" json:"id"` // 租户唯一标识(主键)
|
||
TenantCode string `orm:"column(tenant_code);size(32);unique" json:"tenantCode"` // 租户编码
|
||
TenantName string `orm:"column(tenant_name);size(128)" json:"tenantName"` // 租户名称
|
||
ContactPerson string `orm:"column(contact_person);size(64);null" json:"contactPerson"` // 联系人
|
||
ContactPhone string `orm:"column(contact_phone);size(20);null" json:"contactPhone"` // 联系电话
|
||
ContactEmail string `orm:"column(contact_email);size(128);null" json:"contactEmail"` // 联系邮箱
|
||
Address string `orm:"column(address);size(255);null" json:"address"` // 租户地址
|
||
Worktime string `orm:"column(worktime);size(255);null" json:"worktime"` // 工作时间
|
||
Status int8 `orm:"column(status);default(1)" json:"status"` // 租户状态:1-正常,2-停用,0-删除
|
||
Remark string `orm:"column(remark);size(512);null" json:"remark"` // 备注信息
|
||
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"createTime"` // 创建时间
|
||
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime);null" json:"updateTime"` // 更新时间
|
||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"deleteTime"` // 删除时间
|
||
}
|
||
|
||
// TableName 自定义表名
|
||
func (t *Tenant) TableName() string {
|
||
return "yz_tenant"
|
||
}
|
||
|