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.
22 lines
870 B
22 lines
870 B
2 months ago
|
package models
|
||
|
|
||
|
import (
|
||
|
"ims/util/db/dts"
|
||
|
"time"
|
||
|
|
||
|
"gorm.io/gorm"
|
||
|
)
|
||
|
|
||
|
// Tenant 平台租户
|
||
|
type Tenant struct {
|
||
|
ID uint `json:"id" gorm:"primaryKey;comment:租户ID"`
|
||
|
AccountId uint `json:"account_id" gorm:"comment:公司账户编号(创建者)"`
|
||
|
Name string `json:"name" gorm:"size:200;uniqueIndex;comment:'公司名称'"`
|
||
|
Description dts.NullString `json:"description" gorm:"size:500;comment:公司介绍"`
|
||
|
CreatedAt time.Time `json:"created_at" gorm:"comment:创建时间"`
|
||
|
UpdatedAt time.Time `json:"updated_at" gorm:"comment:更新时间"`
|
||
|
DeletedAt gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"comment:删除时间"`
|
||
|
|
||
|
Account *Account `json:"account,omitempty" gorm:"foreignKey:AccountId"` // 公司账号
|
||
|
}
|