79c65c1da7
- Add length/range limits to KOL variable definitions: max_length and default_value for input/textarea, min_value/max_value/default_number for number. Backend validates and normalizes; frontend renders limit inputs in KolVariableConfig and applies limits at runtime in KolDynamicForm. - Sort workspace cards by most recent prompt/package update, falling back to granted_at. Adds updated_at to KolWorkspaceCard. - Polish TemplatesView, WorkspaceView, and KOL package management UI; route create/update/publish/archive/delete toasts through i18n and expand package form copy and status labels. - Remove stale KnowledgeView.vue.patch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
44 lines
1.5 KiB
Go
44 lines
1.5 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type WorkspaceOverview struct {
|
|
ArticleCount int64 `json:"article_count"`
|
|
PublishedCount int64 `json:"published_count"`
|
|
BrandCount int64 `json:"brand_count"`
|
|
SupportedPlatformCount int `json:"supported_platform_count"`
|
|
}
|
|
|
|
type RecentArticle struct {
|
|
ID int64 `json:"id"`
|
|
Title *string `json:"title"`
|
|
TemplateName *string `json:"template_name"`
|
|
GenerateStatus string `json:"generate_status"`
|
|
PublishStatus string `json:"publish_status"`
|
|
SourceType string `json:"source_type"`
|
|
GenerationMode *string `json:"generation_mode"`
|
|
WordCount int `json:"word_count"`
|
|
SourceLabel *string `json:"source_label"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type QuotaSummary struct {
|
|
PlanCode string `json:"plan_code"`
|
|
PlanName string `json:"plan_name"`
|
|
TotalQuota int `json:"total_quota"`
|
|
UsedQuota int `json:"used_quota"`
|
|
Balance int `json:"balance"`
|
|
ResetAt *time.Time `json:"reset_at"`
|
|
}
|
|
|
|
type KolWorkspaceCard struct {
|
|
SubscriptionPromptID int64 `json:"subscription_prompt_id"`
|
|
GrantedAt time.Time `json:"granted_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
PromptName string `json:"prompt_name"`
|
|
PlatformHint *string `json:"platform_hint"`
|
|
PackageName string `json:"package_name"`
|
|
PackageCover *string `json:"package_cover"`
|
|
KolDisplayName string `json:"kol_display_name"`
|
|
}
|