63 lines
2.9 KiB
Go
63 lines
2.9 KiB
Go
package model
|
|
|
|
// SyncTodo 对应 sync_todos。
|
|
type SyncTodo struct {
|
|
UserID int64 `gorm:"primaryKey" json:"userId"`
|
|
UUID string `gorm:"primaryKey;size:36" json:"uuid"`
|
|
Title string `gorm:"type:text;not null" json:"title"`
|
|
Content string `gorm:"type:mediumtext;not null" json:"content"`
|
|
ProjectName string `gorm:"size:255;not null;default:''" json:"projectName"`
|
|
DueAt string `gorm:"size:32;not null;default:''" json:"dueAt"`
|
|
Priority string `gorm:"size:16;not null;default:medium" json:"priority"`
|
|
Status string `gorm:"size:16;not null;default:open" json:"status"`
|
|
History string `gorm:"type:mediumtext;not null" json:"history"`
|
|
TeamID int64 `gorm:"not null;default:0;index" json:"teamId"`
|
|
CreatedAt string `gorm:"size:32;not null;default:''" json:"createdAt"`
|
|
UpdatedAt string `gorm:"size:32;not null" json:"updatedAt"`
|
|
Deleted int `gorm:"not null;default:0" json:"deleted"`
|
|
}
|
|
|
|
func (SyncTodo) TableName() string { return "sync_todos" }
|
|
|
|
// SyncTicket 对应 sync_tickets。
|
|
type SyncTicket struct {
|
|
UserID int64 `gorm:"primaryKey" json:"userId"`
|
|
UUID string `gorm:"primaryKey;size:36" json:"uuid"`
|
|
Title string `gorm:"type:text;not null" json:"title"`
|
|
Description string `gorm:"type:mediumtext;not null" json:"description"`
|
|
Type string `gorm:"size:16;not null;default:task" json:"type"`
|
|
ProjectName string `gorm:"size:255;not null;default:''" json:"projectName"`
|
|
StartAt string `gorm:"size:32;not null;default:''" json:"startAt"`
|
|
DueAt string `gorm:"size:32;not null;default:''" json:"dueAt"`
|
|
Status string `gorm:"size:16;not null;default:open" json:"status"`
|
|
Priority string `gorm:"size:16;not null;default:medium" json:"priority"`
|
|
History string `gorm:"type:mediumtext;not null" json:"history"`
|
|
TeamID int64 `gorm:"not null;default:0;index" json:"teamId"`
|
|
CreatedAt string `gorm:"size:32;not null;default:''" json:"createdAt"`
|
|
UpdatedAt string `gorm:"size:32;not null" json:"updatedAt"`
|
|
Deleted int `gorm:"not null;default:0" json:"deleted"`
|
|
}
|
|
|
|
func (SyncTicket) TableName() string { return "sync_tickets" }
|
|
|
|
// SyncNote 对应 sync_notes。
|
|
type SyncNote struct {
|
|
UserID int64 `gorm:"primaryKey" json:"userId"`
|
|
UUID string `gorm:"primaryKey;size:36" json:"uuid"`
|
|
Content string `gorm:"type:mediumtext;not null" json:"content"`
|
|
UpdatedAt string `gorm:"size:32;not null" json:"updatedAt"`
|
|
Deleted int `gorm:"not null;default:0" json:"deleted"`
|
|
}
|
|
|
|
func (SyncNote) TableName() string { return "sync_notes" }
|
|
|
|
// SyncSetting 对应 sync_settings。
|
|
type SyncSetting struct {
|
|
UserID int64 `gorm:"primaryKey" json:"userId"`
|
|
Name string `gorm:"primaryKey;size:64" json:"name"`
|
|
Value string `gorm:"type:mediumtext;not null" json:"value"`
|
|
UpdatedAt string `gorm:"size:32;not null" json:"updatedAt"`
|
|
}
|
|
|
|
func (SyncSetting) TableName() string { return "sync_settings" }
|