Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/models/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Label struct {
ID int `json:"id" gorm:"primary_key"`
Name string `json:"name" gorm:"column:name;not null"`
Color string `json:"color" gorm:"type:varchar(7);column:color;not null"`
CreatedBy int `json:"created_by" gorm:"column:created_by;not null"`
CreatedBy int `json:"created_by" gorm:"column:created_by;not null;index"`
CreatedAt time.Time `json:"-" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
UpdatedAt *time.Time `json:"-" gorm:"column:updated_at;default:NULL;autoUpdateTime"`

Expand Down
4 changes: 2 additions & 2 deletions internal/models/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

type Notification struct {
ID int `json:"id" gorm:"primaryKey"`
TaskID int `json:"task_id" gorm:"column:task_id;not null"`
UserID int `json:"user_id" gorm:"column:user_id;not null"`
TaskID int `json:"task_id" gorm:"column:task_id;not null;index"`
UserID int `json:"user_id" gorm:"column:user_id;not null;index"`
Text string `json:"text" gorm:"column:text;not null"`
IsSent bool `json:"is_sent" gorm:"column:is_sent;index;default:false"`
ScheduledFor time.Time `json:"scheduled_for" gorm:"column:scheduled_for;not null;index"`
Expand Down
2 changes: 1 addition & 1 deletion internal/models/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Task struct {
NextDueDate *time.Time `json:"next_due_date" gorm:"column:next_due_date;index"`
EndDate *time.Time `json:"end_date" gorm:"column:end_date;default:NULL"`
IsRolling bool `json:"is_rolling" gorm:"column:is_rolling;default:false"`
CreatedBy int `json:"-" gorm:"column:created_by;not null"`
CreatedBy int `json:"-" gorm:"column:created_by;not null;index"`
IsActive bool `json:"-" gorm:"column:is_active;default:true"`
Notification NotificationTriggerOptions `json:"notification" gorm:"embedded;embeddedPrefix:notification_"`
CreatedAt time.Time `json:"-" gorm:"column:created_at;default:CURRENT_TIMESTAMP"`
Expand Down