增加日程提醒

This commit is contained in:
2026-08-28 16:58:17 +08:00
parent 9588ddbf31
commit d3bc1833f8
13 changed files with 2267 additions and 20 deletions
+2
View File
@@ -99,6 +99,8 @@ func Init(_ string) {
new(BackendSchedule),
new(BackendScheduleReminder),
new(BackendScheduleReminderSendLog),
new(OaSchedule),
)
// 创建全局 Ormer
+32
View File
@@ -0,0 +1,32 @@
package models
import "time"
// OaSchedule OA日程(日历待办): yz_backend_oa_schedule
// 日程按租户 tid + 用户 user_id 双重隔离,供 backend 日程管理页面的
// 月历视图与待办列表读写。schedule_date/start_time/end_time 均以
// "YYYY-MM-DD"、"HH:mm" 字符串存取,前端无需再做时区换算。
type OaSchedule struct {
ID uint64 `orm:"column(id);pk;auto" json:"id"`
Tid int `orm:"column(tid)" json:"tid"`
UserID uint64 `orm:"column(user_id)" json:"user_id"`
UserName string `orm:"column(user_name);size(100);default()" json:"user_name"`
Title string `orm:"column(title);size(255)" json:"title"`
Content string `orm:"column(content);type(text);null" json:"content"`
ScheduleDate string `orm:"column(schedule_date);type(date)" json:"schedule_date"`
StartTime string `orm:"column(start_time);size(8);default()" json:"start_time"`
EndTime string `orm:"column(end_time);size(8);default()" json:"end_time"`
AllDay int8 `orm:"column(all_day);default(1)" json:"all_day"`
Color string `orm:"column(color);size(20);default(#409EFF)" json:"color"`
Priority int8 `orm:"column(priority);default(0)" json:"priority"`
Status int8 `orm:"column(status);default(0)" json:"status"`
FinishTime *time.Time `orm:"column(finish_time);type(datetime);null" json:"finish_time"`
IsDeleted int8 `orm:"column(is_deleted);default(0)" json:"is_deleted"`
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);null" json:"update_time"`
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
}
func (m *OaSchedule) TableName() string {
return "yz_backend_oa_schedule"
}