Files
yunzerwebsiteallinone/go/models/system_tenant.go
T
2026-09-16 00:22:17 +08:00

31 lines
1.9 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"
type SystemTenant struct {
ID uint64 `orm:"column(id);pk;auto" json:"id"`
TenantCode string `orm:"column(tenant_code);size(32)" json:"tenant_code"`
TenantName string `orm:"column(tenant_name);size(128)" json:"tenant_name"`
TenantShortName *string `orm:"column(tenant_short_name);size(128);null" json:"tenant_short_name"`
ContactPerson *string `orm:"column(contact_person);size(64);null" json:"contact_person"`
ContactPhone *string `orm:"column(contact_phone);size(20);null" json:"contact_phone"`
ContactEmail *string `orm:"column(contact_email);size(128);null" json:"contact_email"`
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"`
// PackageID 套餐ID:关联 yz_system_tenant_package(id),0 表示未绑定(视为默认套餐)
PackageID uint64 `orm:"column(package_id);default(0)" json:"package_id"`
// PackageExpireTime 套餐到期时间(NULL-永久有效);超过时效自动切换基础套餐
PackageExpireTime *time.Time `orm:"column(package_expire_time);type(datetime);null" json:"package_expire_time"`
// UserQuota 用户数上限:默认 20,增购后累加。租户用户数达到上限后不允许再新增账号。
UserQuota int `orm:"column(user_quota);default(20)" json:"user_quota"`
Remark *string `orm:"column(remark);size(512);null" json:"remark"`
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 *SystemTenant) TableName() string {
return "yz_system_tenant"
}