Changeset 0.19.0.1 (#82)
This commit is contained in:
@@ -308,6 +308,7 @@ type Channel struct {
|
||||
IsPinned bool `json:"is_pinned" db:"is_pinned"`
|
||||
FolderID *string `json:"folder_id,omitempty" db:"folder_id"`
|
||||
TeamID *string `json:"team_id,omitempty" db:"team_id"`
|
||||
ProjectID *string `json:"project_id,omitempty" db:"project_id"`
|
||||
Settings JSONMap `json:"settings,omitempty" db:"settings"`
|
||||
}
|
||||
|
||||
@@ -376,10 +377,53 @@ type Folder struct {
|
||||
|
||||
type Project struct {
|
||||
BaseModel
|
||||
UserID string `json:"user_id" db:"user_id"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Description string `json:"description,omitempty" db:"description"`
|
||||
Color string `json:"color,omitempty" db:"color"`
|
||||
Name string `json:"name" db:"name"`
|
||||
Description string `json:"description,omitempty" db:"description"`
|
||||
Color *string `json:"color,omitempty" db:"color"`
|
||||
Icon *string `json:"icon,omitempty" db:"icon"`
|
||||
Scope string `json:"scope" db:"scope"` // personal, team, global
|
||||
OwnerID string `json:"owner_id" db:"owner_id"`
|
||||
TeamID *string `json:"team_id,omitempty" db:"team_id"`
|
||||
IsArchived bool `json:"is_archived" db:"is_archived"`
|
||||
Settings JSONMap `json:"settings,omitempty" db:"settings"`
|
||||
|
||||
// Computed fields (not DB columns)
|
||||
ChannelCount int `json:"channel_count,omitempty"`
|
||||
KBCount int `json:"kb_count,omitempty"`
|
||||
NoteCount int `json:"note_count,omitempty"`
|
||||
}
|
||||
|
||||
// ProjectPatch holds optional fields for updating a project.
|
||||
type ProjectPatch struct {
|
||||
Name *string `json:"name,omitempty"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Color *string `json:"color,omitempty"`
|
||||
Icon *string `json:"icon,omitempty"`
|
||||
IsArchived *bool `json:"is_archived,omitempty"`
|
||||
}
|
||||
|
||||
// ProjectChannel represents a channel's membership in a project.
|
||||
type ProjectChannel struct {
|
||||
ProjectID string `json:"project_id" db:"project_id"`
|
||||
ChannelID string `json:"channel_id" db:"channel_id"`
|
||||
Position int `json:"position" db:"position"`
|
||||
Folder string `json:"folder,omitempty" db:"folder"`
|
||||
AddedAt string `json:"added_at" db:"added_at"`
|
||||
}
|
||||
|
||||
// ProjectKB represents a KB's association with a project.
|
||||
type ProjectKB struct {
|
||||
ProjectID string `json:"project_id" db:"project_id"`
|
||||
KBID string `json:"kb_id" db:"kb_id"`
|
||||
AutoSearch bool `json:"auto_search" db:"auto_search"`
|
||||
AddedAt string `json:"added_at" db:"added_at"`
|
||||
}
|
||||
|
||||
// ProjectNote represents a note's association with a project.
|
||||
type ProjectNote struct {
|
||||
ProjectID string `json:"project_id" db:"project_id"`
|
||||
NoteID string `json:"note_id" db:"note_id"`
|
||||
AddedAt string `json:"added_at" db:"added_at"`
|
||||
}
|
||||
|
||||
// =========================================
|
||||
|
||||
Reference in New Issue
Block a user