30 lines
1.3 KiB
Go
30 lines
1.3 KiB
Go
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
// Code generated by gorm.io/gen. DO NOT EDIT.
|
|
|
|
package models
|
|
|
|
import (
|
|
"platform/pkg/orm"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
const TableNameWhitelist = "whitelist"
|
|
|
|
// Whitelist mapped from table <whitelist>
|
|
type Whitelist struct {
|
|
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:白名单ID" json:"id"` // 白名单ID
|
|
UserID int32 `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"` // 用户ID
|
|
Host string `gorm:"column:host;not null;comment:IP地址" json:"host"` // IP地址
|
|
Remark string `gorm:"column:remark;comment:备注" json:"remark"` // 备注
|
|
CreatedAt orm.LocalDateTime `gorm:"column:created_at;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
|
|
UpdatedAt orm.LocalDateTime `gorm:"column:updated_at;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
|
|
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:删除时间" json:"deleted_at"` // 删除时间
|
|
}
|
|
|
|
// TableName Whitelist's table name
|
|
func (*Whitelist) TableName() string {
|
|
return TableNameWhitelist
|
|
}
|