更新代码
This commit is contained in:
@@ -1,24 +1,33 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// SystemReminderList 站内信消息列表表 yz_system_reminderlist
|
||||
type SystemReminderList struct {
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Title string `orm:"column(title);size(255)" json:"title"`
|
||||
Content string `orm:"column(content);type(text)" json:"content"`
|
||||
SenderID uint64 `orm:"column(sender_id);default(0)" json:"sender_id"`
|
||||
SenderType string `orm:"column(sender_type);size(32);default('system')" json:"sender_type"` // system, platform, tenant
|
||||
ReceiverID uint64 `orm:"column(receiver_id)" json:"receiver_id"`
|
||||
ReceiverType string `orm:"column(receiver_type);size(32)" json:"receiver_type"` // platform, tenant
|
||||
IsRead int8 `orm:"column(is_read);default(0)" json:"is_read"` // 0-未读, 1-已读
|
||||
ReadTime *time.Time `orm:"column(read_time);type(datetime);null" json:"read_time"`
|
||||
CreateTime *time.Time `orm:"column(create_time);type(datetime);null" json:"create_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
BatchID string `orm:"column(batch_id);size(64);default('')" json:"batch_id"`
|
||||
TargetType string `orm:"column(target_type);size(32);default('')" json:"target_type"`
|
||||
TargetRoleID uint64 `orm:"column(target_role_id);default(0)" json:"target_role_id"`
|
||||
TargetTenantID uint64 `orm:"column(target_tenant_id);default(0)" json:"target_tenant_id"`
|
||||
ID uint64 `orm:"column(id);pk;auto" json:"id"`
|
||||
Title string `orm:"column(title);size(255)" json:"title"`
|
||||
Content string `orm:"column(content);type(text)" json:"content"`
|
||||
SenderID uint64 `orm:"column(sender_id);default(0)" json:"sender_id"`
|
||||
SenderType string `orm:"column(sender_type);size(32);default('system')" json:"sender_type"` // system, platform, tenant
|
||||
ReceiverID uint64 `orm:"column(receiver_id)" json:"receiver_id"`
|
||||
ReceiverType string `orm:"column(receiver_type);size(32)" json:"receiver_type"` // platform, tenant
|
||||
IsRead int8 `orm:"column(is_read);default(0)" json:"is_read"` // 0-未读, 1-已读
|
||||
ReadTime *time.Time `orm:"column(read_time);type(datetime);null" json:"read_time"`
|
||||
CreateTime *time.Time `orm:"column(create_time);type(datetime);null" json:"create_time"`
|
||||
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
|
||||
BatchID string `orm:"column(batch_id);size(64);default('')" json:"batch_id"`
|
||||
// TargetType 接收目标类型:
|
||||
// all 全平台 / platform 平台端 / tenant_all 租户端(所有租户) /
|
||||
// tenant_role 租户角色 / tenant 租户 / tenant_user 租户用户
|
||||
// 兼容旧数据:role 平台角色
|
||||
TargetType string `orm:"column(target_type);size(32);default('')" json:"target_type"`
|
||||
// TargetIDs 多选接收目标ID列表(JSON 数组字符串),按 TargetType 解释:
|
||||
// tenant_role=角色ID列表, tenant=租户ID列表, tenant_user=用户ID列表
|
||||
TargetIDs *string `orm:"column(target_ids);type(text);null" json:"target_ids"`
|
||||
TargetRoleID uint64 `orm:"column(target_role_id);default(0)" json:"target_role_id"` // 兼容旧数据:平台角色ID
|
||||
TargetTenantID uint64 `orm:"column(target_tenant_id);default(0)" json:"target_tenant_id"` // 兼容旧数据:特定租户ID
|
||||
}
|
||||
|
||||
func (m *SystemReminderList) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user