32 lines
1.3 KiB
Go
32 lines
1.3 KiB
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
// SupervisorReminderSetting 表示“被监督用户(owner)”对提醒机制的配置。
|
|
// 注意:提醒本质是隐私相关能力,默认应为关闭,需 owner 显式开启。
|
|
type SupervisorReminderSetting struct {
|
|
ID uint `gorm:"primaryKey;comment:主键" json:"id"`
|
|
CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"`
|
|
UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"`
|
|
|
|
OwnerUID int `gorm:"column:owner_uid;uniqueIndex;comment:被监督用户ID" json:"owner_uid"`
|
|
|
|
Enabled bool `gorm:"column:enabled;comment:是否启用提醒" json:"enabled"`
|
|
NotifyTime string `gorm:"column:notify_time;size:5;comment:提醒时间(HH:MM)" json:"notify_time"`
|
|
MaxPerDay int `gorm:"column:max_per_day;comment:每日最多提醒次数(每个监督人)" json:"max_per_day"`
|
|
ChannelHint string `gorm:"column:channel_hint;size:32;comment:提醒通道提示(stub|subscribe_msg...)" json:"channel_hint,omitempty"`
|
|
}
|
|
|
|
func (SupervisorReminderSetting) TableName() string {
|
|
return "fa_quit_checkin_supervisor_reminder_setting"
|
|
}
|
|
|
|
func (SupervisorReminderSetting) TableComment() string {
|
|
return "V2-无烟打卡-监督提醒设置"
|
|
}
|