641 lines
28 KiB
Go
641 lines
28 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.30.0
|
|
|
|
package generated
|
|
|
|
import (
|
|
"github.com/jackc/pgx/v5/pgtype"
|
|
)
|
|
|
|
type Article struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
SourceType string `json:"source_type"`
|
|
TemplateID pgtype.Int8 `json:"template_id"`
|
|
PromptRuleID pgtype.Int8 `json:"prompt_rule_id"`
|
|
CurrentVersionID pgtype.Int8 `json:"current_version_id"`
|
|
GenerateStatus string `json:"generate_status"`
|
|
PublishStatus string `json:"publish_status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
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 {
|
|
ID int64 `json:"id"`
|
|
Scope string `json:"scope"`
|
|
TenantID pgtype.Int8 `json:"tenant_id"`
|
|
OriginType string `json:"origin_type"`
|
|
ShareCodeID pgtype.Int8 `json:"share_code_id"`
|
|
TemplateKey string `json:"template_key"`
|
|
TemplateName string `json:"template_name"`
|
|
PromptTemplate pgtype.Text `json:"prompt_template"`
|
|
PromptVisibility string `json:"prompt_visibility"`
|
|
ProtectedPromptAssetKey pgtype.Text `json:"protected_prompt_asset_key"`
|
|
CardConfigJson []byte `json:"card_config_json"`
|
|
Status string `json:"status"`
|
|
VersionNo int32 `json:"version_no"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type ArticleVersion struct {
|
|
ID int64 `json:"id"`
|
|
ArticleID int64 `json:"article_id"`
|
|
VersionNo int32 `json:"version_no"`
|
|
Title pgtype.Text `json:"title"`
|
|
HtmlContent pgtype.Text `json:"html_content"`
|
|
MarkdownContent pgtype.Text `json:"markdown_content"`
|
|
WordCount int32 `json:"word_count"`
|
|
SourceLabel pgtype.Text `json:"source_label"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type AuditLog struct {
|
|
ID int64 `json:"id"`
|
|
OperatorID int64 `json:"operator_id"`
|
|
TenantID pgtype.Int8 `json:"tenant_id"`
|
|
Module string `json:"module"`
|
|
Action string `json:"action"`
|
|
BeforeJson []byte `json:"before_json"`
|
|
AfterJson []byte `json:"after_json"`
|
|
Result pgtype.Text `json:"result"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
ResourceType pgtype.Text `json:"resource_type"`
|
|
ResourceID pgtype.Int8 `json:"resource_id"`
|
|
RequestID pgtype.Text `json:"request_id"`
|
|
ErrorMessage pgtype.Text `json:"error_message"`
|
|
}
|
|
|
|
type Brand struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
Name string `json:"name"`
|
|
Description pgtype.Text `json:"description"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
Website pgtype.Text `json:"website"`
|
|
}
|
|
|
|
type BrandKeyword struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
BrandID int64 `json:"brand_id"`
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type BrandQuestion struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
BrandID int64 `json:"brand_id"`
|
|
KeywordID int64 `json:"keyword_id"`
|
|
QuestionText string `json:"question_text"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type Competitor struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
BrandID int64 `json:"brand_id"`
|
|
Name string `json:"name"`
|
|
Website pgtype.Text `json:"website"`
|
|
Description pgtype.Text `json:"description"`
|
|
ProductLinesJson []byte `json:"product_lines_json"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type GenerationTask struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
ArticleID pgtype.Int8 `json:"article_id"`
|
|
TaskBatchID pgtype.Text `json:"task_batch_id"`
|
|
QuotaReservationID pgtype.Int8 `json:"quota_reservation_id"`
|
|
TaskType string `json:"task_type"`
|
|
RequestHash pgtype.Text `json:"request_hash"`
|
|
InputParamsJson []byte `json:"input_params_json"`
|
|
Status string `json:"status"`
|
|
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"`
|
|
OperatorID pgtype.Int8 `json:"operator_id"`
|
|
}
|
|
|
|
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"`
|
|
ContentHash pgtype.Text `json:"content_hash"`
|
|
}
|
|
|
|
type ImageAssetReference struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
ImageAssetID int64 `json:"image_asset_id"`
|
|
ArticleID int64 `json:"article_id"`
|
|
RefScope string `json:"ref_scope"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ImageFolder struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
Name string `json:"name"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type KnowledgeChunksMetum struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
KnowledgeItemID int64 `json:"knowledge_item_id"`
|
|
ChunkIndex int32 `json:"chunk_index"`
|
|
TokenCount int32 `json:"token_count"`
|
|
QdrantPointID string `json:"qdrant_point_id"`
|
|
ItemVersion int32 `json:"item_version"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type KnowledgeGroup struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
Name string `json:"name"`
|
|
ParentID pgtype.Int8 `json:"parent_id"`
|
|
SortOrder int32 `json:"sort_order"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type KnowledgeItem struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
GroupID int64 `json:"group_id"`
|
|
SourceType string `json:"source_type"`
|
|
Name string `json:"name"`
|
|
SourceUri pgtype.Text `json:"source_uri"`
|
|
StorageKey string `json:"storage_key"`
|
|
ContentText pgtype.Text `json:"content_text"`
|
|
Status string `json:"status"`
|
|
SizeBytes int64 `json:"size_bytes"`
|
|
ItemVersion int32 `json:"item_version"`
|
|
ErrorMessage pgtype.Text `json:"error_message"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
MarkdownContent pgtype.Text `json:"markdown_content"`
|
|
}
|
|
|
|
type KnowledgeParseTask struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
KnowledgeItemID int64 `json:"knowledge_item_id"`
|
|
SourceType string `json:"source_type"`
|
|
Status string `json:"status"`
|
|
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 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"`
|
|
Name string `json:"name"`
|
|
Category string `json:"category"`
|
|
ShortName string `json:"short_name"`
|
|
AccentColor string `json:"accent_color"`
|
|
LoginUrl pgtype.Text `json:"login_url"`
|
|
LogoUrl pgtype.Text `json:"logo_url"`
|
|
Status string `json:"status"`
|
|
SortOrder int32 `json:"sort_order"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type Plan struct {
|
|
ID int64 `json:"id"`
|
|
PlanCode string `json:"plan_code"`
|
|
Name string `json:"name"`
|
|
QuotaPolicyJson []byte `json:"quota_policy_json"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type PlatformAccount struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
UserID int64 `json:"user_id"`
|
|
PlatformID string `json:"platform_id"`
|
|
PlatformUid string `json:"platform_uid"`
|
|
Nickname string `json:"nickname"`
|
|
AvatarUrl pgtype.Text `json:"avatar_url"`
|
|
Status string `json:"status"`
|
|
MetadataJson []byte `json:"metadata_json"`
|
|
LastCheckAt pgtype.Timestamptz `json:"last_check_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type PlatformUserRole struct {
|
|
ID int64 `json:"id"`
|
|
UserID int64 `json:"user_id"`
|
|
PlatformRole string `json:"platform_role"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type PluginInstallation struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
UserID int64 `json:"user_id"`
|
|
InstallationKey string `json:"installation_key"`
|
|
InstallationName string `json:"installation_name"`
|
|
BrowserName pgtype.Text `json:"browser_name"`
|
|
ClientVersion pgtype.Text `json:"client_version"`
|
|
InstallationTokenHash string `json:"installation_token_hash"`
|
|
Status string `json:"status"`
|
|
LastSeenAt pgtype.Timestamptz `json:"last_seen_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type PluginSession struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
UserID int64 `json:"user_id"`
|
|
PluginInstallationID pgtype.Int8 `json:"plugin_installation_id"`
|
|
ActionType string `json:"action_type"`
|
|
ResourceType pgtype.Text `json:"resource_type"`
|
|
ResourceID pgtype.Int8 `json:"resource_id"`
|
|
PlatformAccountID pgtype.Int8 `json:"platform_account_id"`
|
|
PlatformID string `json:"platform_id"`
|
|
SessionToken string `json:"session_token"`
|
|
ClientVersion pgtype.Text `json:"client_version"`
|
|
Status string `json:"status"`
|
|
ExpireAt pgtype.Timestamptz `json:"expire_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type PromptRule struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
GroupID pgtype.Int8 `json:"group_id"`
|
|
Name string `json:"name"`
|
|
PromptContent string `json:"prompt_content"`
|
|
Scene pgtype.Text `json:"scene"`
|
|
DefaultTone pgtype.Text `json:"default_tone"`
|
|
DefaultWordCount pgtype.Int4 `json:"default_word_count"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type PromptRuleGroup struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
Name string `json:"name"`
|
|
SortOrder int32 `json:"sort_order"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type PromptRuleKnowledgeGroup struct {
|
|
PromptRuleID int64 `json:"prompt_rule_id"`
|
|
KnowledgeGroupID int64 `json:"knowledge_group_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type PublishBatch struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
ArticleID int64 `json:"article_id"`
|
|
InitiatorUserID int64 `json:"initiator_user_id"`
|
|
Status string `json:"status"`
|
|
PublishType string `json:"publish_type"`
|
|
CoverAssetUrl pgtype.Text `json:"cover_asset_url"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type PublishRecord struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
PublishBatchID int64 `json:"publish_batch_id"`
|
|
ArticleID int64 `json:"article_id"`
|
|
PlatformAccountID int64 `json:"platform_account_id"`
|
|
PlatformID string `json:"platform_id"`
|
|
Status string `json:"status"`
|
|
ExternalArticleID pgtype.Text `json:"external_article_id"`
|
|
ExternalArticleUrl pgtype.Text `json:"external_article_url"`
|
|
ExternalManageUrl pgtype.Text `json:"external_manage_url"`
|
|
PublishedAt pgtype.Timestamptz `json:"published_at"`
|
|
RequestPayloadJson []byte `json:"request_payload_json"`
|
|
ResponsePayloadJson []byte `json:"response_payload_json"`
|
|
ErrorMessage pgtype.Text `json:"error_message"`
|
|
RetryCount int32 `json:"retry_count"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type QuotaReservation struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
QuotaType string `json:"quota_type"`
|
|
ResourceType string `json:"resource_type"`
|
|
ResourceID pgtype.Int8 `json:"resource_id"`
|
|
ReservedAmount int32 `json:"reserved_amount"`
|
|
ConsumedAmount int32 `json:"consumed_amount"`
|
|
RefundedAmount int32 `json:"refunded_amount"`
|
|
Status string `json:"status"`
|
|
ExpireAt pgtype.Timestamptz `json:"expire_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
OperatorID pgtype.Int8 `json:"operator_id"`
|
|
}
|
|
|
|
type ScheduleTask struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
PromptRuleID int64 `json:"prompt_rule_id"`
|
|
BrandID pgtype.Int8 `json:"brand_id"`
|
|
Name string `json:"name"`
|
|
CronExpr string `json:"cron_expr"`
|
|
TargetPlatform pgtype.Text `json:"target_platform"`
|
|
StartAt pgtype.Timestamptz `json:"start_at"`
|
|
EndAt pgtype.Timestamptz `json:"end_at"`
|
|
NextRunAt pgtype.Timestamptz `json:"next_run_at"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
OperatorID pgtype.Int8 `json:"operator_id"`
|
|
EnableWebSearch bool `json:"enable_web_search"`
|
|
GenerateCount int32 `json:"generate_count"`
|
|
}
|
|
|
|
type TaskRecord struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
TaskType string `json:"task_type"`
|
|
ResourceType string `json:"resource_type"`
|
|
ResourceID int64 `json:"resource_id"`
|
|
Status string `json:"status"`
|
|
RetryCount int32 `json:"retry_count"`
|
|
TaskBatchID pgtype.Text `json:"task_batch_id"`
|
|
ErrorMessage pgtype.Text `json:"error_message"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
OperatorID pgtype.Int8 `json:"operator_id"`
|
|
}
|
|
|
|
type TemplateAssistTask struct {
|
|
ID string `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
TemplateID int64 `json:"template_id"`
|
|
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"`
|
|
TaskType string `json:"task_type"`
|
|
OperatorID pgtype.Int8 `json:"operator_id"`
|
|
}
|
|
|
|
type Tenant struct {
|
|
ID int64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
FrozenAt pgtype.Timestamptz `json:"frozen_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type TenantImageStorageUsage struct {
|
|
TenantID int64 `json:"tenant_id"`
|
|
UsedBytes int64 `json:"used_bytes"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type TenantMembership struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
UserID int64 `json:"user_id"`
|
|
TenantRole string `json:"tenant_role"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type TenantMonitoringQuota struct {
|
|
TenantID int64 `json:"tenant_id"`
|
|
MaxBrands int32 `json:"max_brands"`
|
|
CollectionMode string `json:"collection_mode"`
|
|
QuestionSelectionMode string `json:"question_selection_mode"`
|
|
CollectFrequency string `json:"collect_frequency"`
|
|
EnabledPlatforms []byte `json:"enabled_platforms"`
|
|
PrimaryInstallationID pgtype.Int8 `json:"primary_installation_id"`
|
|
TaskDailyHardCap int32 `json:"task_daily_hard_cap"`
|
|
PlanTier string `json:"plan_tier"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type TenantPlanSubscription struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
PlanID int64 `json:"plan_id"`
|
|
StartAt pgtype.Timestamptz `json:"start_at"`
|
|
EndAt pgtype.Timestamptz `json:"end_at"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type TenantQuotaLedger struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
QuotaType string `json:"quota_type"`
|
|
Delta int32 `json:"delta"`
|
|
BalanceAfter int32 `json:"balance_after"`
|
|
Reason pgtype.Text `json:"reason"`
|
|
ReferenceType pgtype.Text `json:"reference_type"`
|
|
ReferenceID pgtype.Int8 `json:"reference_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
OperatorID pgtype.Int8 `json:"operator_id"`
|
|
}
|
|
|
|
type User struct {
|
|
ID int64 `json:"id"`
|
|
Email string `json:"email"`
|
|
Phone pgtype.Text `json:"phone"`
|
|
PasswordHash string `json:"password_hash"`
|
|
Name string `json:"name"`
|
|
AvatarUrl pgtype.Text `json:"avatar_url"`
|
|
Status string `json:"status"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|