繰り返し追加機能の追加

This commit is contained in:
2026-01-07 23:38:23 +09:00
parent b2fbb472df
commit 920928746e
13 changed files with 964 additions and 129 deletions

View File

@@ -7,26 +7,29 @@ import (
)
type Assignment struct {
ID uint `gorm:"primarykey" json:"id"`
UserID uint `gorm:"not null;index" json:"user_id"`
Title string `gorm:"not null" json:"title"`
Description string `json:"description"`
Subject string `json:"subject"`
Priority string `gorm:"not null;default:medium" json:"priority"` // low, medium, high
DueDate time.Time `gorm:"not null" json:"due_date"`
IsCompleted bool `gorm:"default:false" json:"is_completed"`
IsArchived bool `gorm:"default:false;index" json:"is_archived"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
// Reminder notification settings (one-time)
ReminderEnabled bool `gorm:"default:false" json:"reminder_enabled"`
ReminderAt *time.Time `json:"reminder_at,omitempty"`
ReminderSent bool `gorm:"default:false;index" json:"reminder_sent"`
// Urgent reminder settings (repeating until completed)
UrgentReminderEnabled bool `gorm:"default:true" json:"urgent_reminder_enabled"`
LastUrgentReminderSent *time.Time `json:"last_urgent_reminder_sent,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
ID uint `gorm:"primarykey" json:"id"`
UserID uint `gorm:"not null;index" json:"user_id"`
Title string `gorm:"not null" json:"title"`
Description string `json:"description"`
Subject string `json:"subject"`
Priority string `gorm:"not null;default:medium" json:"priority"`
DueDate time.Time `gorm:"not null" json:"due_date"`
IsCompleted bool `gorm:"default:false" json:"is_completed"`
IsArchived bool `gorm:"default:false;index" json:"is_archived"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
ReminderEnabled bool `gorm:"default:false" json:"reminder_enabled"`
ReminderAt *time.Time `json:"reminder_at,omitempty"`
ReminderSent bool `gorm:"default:false;index" json:"reminder_sent"`
UrgentReminderEnabled bool `gorm:"default:true" json:"urgent_reminder_enabled"`
LastUrgentReminderSent *time.Time `json:"last_urgent_reminder_sent,omitempty"`
// Recurring assignment reference
RecurringAssignmentID *uint `gorm:"index" json:"recurring_assignment_id,omitempty"`
RecurringAssignment *RecurringAssignment `gorm:"foreignKey:RecurringAssignmentID" json:"-"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
User *User `gorm:"foreignKey:UserID" json:"user,omitempty"`
}