File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ type Label struct {
66 ID int `json:"id" gorm:"primary_key"`
77 Name string `json:"name" gorm:"column:name;not null"`
88 Color string `json:"color" gorm:"type:varchar(7);column:color;not null"`
9- CreatedBy int `json:"created_by" gorm:"column:created_by;not null"`
9+ CreatedBy int `json:"created_by" gorm:"column:created_by;not null;index:idx_labels_created_by "`
1010 CreatedAt time.Time `json:"-" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
1111 UpdatedAt * time.Time `json:"-" gorm:"column:updated_at;default:NULL;autoUpdateTime"`
1212
Original file line number Diff line number Diff line change 66
77type Notification struct {
88 ID int `json:"id" gorm:"primaryKey"`
9- TaskID int `json:"task_id" gorm:"column:task_id;not null"`
10- UserID int `json:"user_id" gorm:"column:user_id;not null"`
9+ TaskID int `json:"task_id" gorm:"column:task_id;not null;index:idx_notifications_task_id "`
10+ UserID int `json:"user_id" gorm:"column:user_id;not null;index:idx_notifications_user_id "`
1111 Text string `json:"text" gorm:"column:text;not null"`
1212 IsSent bool `json:"is_sent" gorm:"column:is_sent;index;default:false"`
1313 ScheduledFor time.Time `json:"scheduled_for" gorm:"column:scheduled_for;not null;index"`
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type Task struct {
1111 NextDueDate * time.Time `json:"next_due_date" gorm:"column:next_due_date;index"`
1212 EndDate * time.Time `json:"end_date" gorm:"column:end_date;default:NULL"`
1313 IsRolling bool `json:"is_rolling" gorm:"column:is_rolling;default:false"`
14- CreatedBy int `json:"-" gorm:"column:created_by;not null"`
14+ CreatedBy int `json:"-" gorm:"column:created_by;not null;index:idx_tasks_created_by "`
1515 IsActive bool `json:"-" gorm:"column:is_active;default:true"`
1616 Notification NotificationTriggerOptions `json:"notification" gorm:"embedded;embeddedPrefix:notification_"`
1717 CreatedAt time.Time `json:"-" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
You can’t perform that action at this time.
0 commit comments