feat(kol): add sqlc queries for all KOL tables
This commit is contained in:
@@ -21,6 +21,7 @@ type Article struct {
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
||||
WizardStateJson []byte `json:"wizard_state_json"`
|
||||
KolPromptID pgtype.Int8 `json:"kol_prompt_id"`
|
||||
}
|
||||
|
||||
type ArticleTemplate struct {
|
||||
@@ -137,17 +138,18 @@ type GenerationTask struct {
|
||||
}
|
||||
|
||||
type ImageAsset struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
FolderID pgtype.Int8 `json:"folder_id"`
|
||||
ObjectKey string `json:"object_key"`
|
||||
Name string `json:"name"`
|
||||
SizeBytes int64 `json:"size_bytes"`
|
||||
Status string `json:"status"`
|
||||
CreatedBy int64 `json:"created_by"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
FolderID pgtype.Int8 `json:"folder_id"`
|
||||
ObjectKey string `json:"object_key"`
|
||||
Name string `json:"name"`
|
||||
SizeBytes int64 `json:"size_bytes"`
|
||||
Status string `json:"status"`
|
||||
CreatedBy int64 `json:"created_by"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
||||
ContentHash pgtype.Text `json:"content_hash"`
|
||||
}
|
||||
|
||||
type ImageAssetReference struct {
|
||||
@@ -224,6 +226,126 @@ type KnowledgeParseTask struct {
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
}
|
||||
|
||||
type KolAssistTask struct {
|
||||
ID string `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
KolProfileID int64 `json:"kol_profile_id"`
|
||||
PromptID pgtype.Int8 `json:"prompt_id"`
|
||||
OperatorID int64 `json:"operator_id"`
|
||||
TaskType string `json:"task_type"`
|
||||
Status string `json:"status"`
|
||||
RequestJson []byte `json:"request_json"`
|
||||
ResultJson []byte `json:"result_json"`
|
||||
ErrorMessage pgtype.Text `json:"error_message"`
|
||||
StartedAt pgtype.Timestamptz `json:"started_at"`
|
||||
CompletedAt pgtype.Timestamptz `json:"completed_at"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
}
|
||||
|
||||
type KolPackage struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
KolProfileID int64 `json:"kol_profile_id"`
|
||||
Name string `json:"name"`
|
||||
Description pgtype.Text `json:"description"`
|
||||
CoverUrl pgtype.Text `json:"cover_url"`
|
||||
Industry pgtype.Text `json:"industry"`
|
||||
Tags []byte `json:"tags"`
|
||||
PriceNote pgtype.Text `json:"price_note"`
|
||||
Status string `json:"status"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
||||
}
|
||||
|
||||
type KolProfile struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
UserID int64 `json:"user_id"`
|
||||
DisplayName string `json:"display_name"`
|
||||
Bio pgtype.Text `json:"bio"`
|
||||
AvatarUrl pgtype.Text `json:"avatar_url"`
|
||||
MarketEnabled bool `json:"market_enabled"`
|
||||
Status string `json:"status"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
||||
}
|
||||
|
||||
type KolPrompt struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
PackageID int64 `json:"package_id"`
|
||||
Name string `json:"name"`
|
||||
PlatformHint pgtype.Text `json:"platform_hint"`
|
||||
Status string `json:"status"`
|
||||
SortOrder int32 `json:"sort_order"`
|
||||
PublishedRevisionNo pgtype.Int4 `json:"published_revision_no"`
|
||||
DraftRevisionNo pgtype.Int4 `json:"draft_revision_no"`
|
||||
CreatedBy int64 `json:"created_by"`
|
||||
UpdatedBy int64 `json:"updated_by"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
||||
}
|
||||
|
||||
type KolPromptRevision struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
PromptID int64 `json:"prompt_id"`
|
||||
RevisionNo int32 `json:"revision_no"`
|
||||
PromptAssetKey string `json:"prompt_asset_key"`
|
||||
SchemaJson []byte `json:"schema_json"`
|
||||
CardConfigJson []byte `json:"card_config_json"`
|
||||
CreatedBy int64 `json:"created_by"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
}
|
||||
|
||||
type KolSubscription struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
PackageID int64 `json:"package_id"`
|
||||
Status string `json:"status"`
|
||||
ApprovedBy pgtype.Int8 `json:"approved_by"`
|
||||
StartAt pgtype.Timestamptz `json:"start_at"`
|
||||
EndAt pgtype.Timestamptz `json:"end_at"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
}
|
||||
|
||||
type KolSubscriptionPrompt struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
SubscriptionID int64 `json:"subscription_id"`
|
||||
PackageID int64 `json:"package_id"`
|
||||
PromptID int64 `json:"prompt_id"`
|
||||
Status string `json:"status"`
|
||||
GrantedAt pgtype.Timestamptz `json:"granted_at"`
|
||||
RevokedAt pgtype.Timestamptz `json:"revoked_at"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
||||
}
|
||||
|
||||
type KolUsageLog struct {
|
||||
ID int64 `json:"id"`
|
||||
TenantID int64 `json:"tenant_id"`
|
||||
SubscriptionID pgtype.Int8 `json:"subscription_id"`
|
||||
SubscriptionPromptID pgtype.Int8 `json:"subscription_prompt_id"`
|
||||
PackageID int64 `json:"package_id"`
|
||||
PromptID int64 `json:"prompt_id"`
|
||||
PromptRevisionNo int32 `json:"prompt_revision_no"`
|
||||
ArticleID pgtype.Int8 `json:"article_id"`
|
||||
GenerationTaskID pgtype.Int8 `json:"generation_task_id"`
|
||||
Status string `json:"status"`
|
||||
VariablesSnapshot []byte `json:"variables_snapshot"`
|
||||
SchemaSnapshot []byte `json:"schema_snapshot"`
|
||||
RenderedPromptHash pgtype.Text `json:"rendered_prompt_hash"`
|
||||
ErrorMessage pgtype.Text `json:"error_message"`
|
||||
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
||||
FinishedAt pgtype.Timestamptz `json:"finished_at"`
|
||||
}
|
||||
|
||||
type MediaPlatform struct {
|
||||
ID int64 `json:"id"`
|
||||
PlatformID string `json:"platform_id"`
|
||||
|
||||
Reference in New Issue
Block a user