go-platform/models/tenant.go
2026-04-01 15:15:21 +08:00

26 lines
1.7 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package models
import "time"
// Tenant 租户表 yz_system_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_system_tenant"
}