b646dfdc11
Desktop Client Build / Resolve Build Metadata (push) Successful in 27s
Backend CI / Backend (push) Successful in 15m27s
Desktop Client Build / Build Desktop Client (push) Successful in 23m20s
Desktop Client Build / Publish Client Artifacts to NAS (push) Successful in 37s
1100 lines
52 KiB
Go
1100 lines
52 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.30.0
|
|
|
|
package generated
|
|
|
|
import (
|
|
"github.com/jackc/pgx/v5/pgtype"
|
|
)
|
|
|
|
type AiPlatform struct {
|
|
ID int64 `json:"id"`
|
|
AiPlatformID string `json:"ai_platform_id"`
|
|
Name string `json:"name"`
|
|
ShortName string `json:"short_name"`
|
|
AccentColor string `json:"accent_color"`
|
|
LoginUrl pgtype.Text `json:"login_url"`
|
|
Status string `json:"status"`
|
|
SortOrder int32 `json:"sort_order"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type AiPointUsageLog struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
OperatorID pgtype.Int8 `json:"operator_id"`
|
|
QuotaReservationID pgtype.Int8 `json:"quota_reservation_id"`
|
|
UsageType string `json:"usage_type"`
|
|
ResourceType pgtype.Text `json:"resource_type"`
|
|
ResourceID pgtype.Int8 `json:"resource_id"`
|
|
ResourceUid pgtype.Text `json:"resource_uid"`
|
|
RequestChars int32 `json:"request_chars"`
|
|
BaseChars int32 `json:"base_chars"`
|
|
Points int32 `json:"points"`
|
|
Status string `json:"status"`
|
|
Model pgtype.Text `json:"model"`
|
|
MetadataJson []byte `json:"metadata_json"`
|
|
ErrorMessage pgtype.Text `json:"error_message"`
|
|
CompletedAt pgtype.Timestamptz `json:"completed_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
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"`
|
|
BrandID int64 `json:"brand_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"`
|
|
// Plaintext extracted at save time, used by compliance gate to skip diff reconstruction.
|
|
PlaintextSnapshot pgtype.Text `json:"plaintext_snapshot"`
|
|
// Hot-path manual review stamp: none|pending|approved|rejected.
|
|
ManualReviewStatus string `json:"manual_review_status"`
|
|
ManualReviewID pgtype.Int8 `json:"manual_review_id"`
|
|
ManualReviewUpdatedAt pgtype.Timestamptz `json:"manual_review_updated_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"`
|
|
Layer string `json:"layer"`
|
|
SeedWord pgtype.Text `json:"seed_word"`
|
|
Source string `json:"source"`
|
|
}
|
|
|
|
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"`
|
|
Layer string `json:"layer"`
|
|
Intent string `json:"intent"`
|
|
Source string `json:"source"`
|
|
}
|
|
|
|
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 ComplianceAckRecord struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
ArticleID int64 `json:"article_id"`
|
|
ArticleVersionID int64 `json:"article_version_id"`
|
|
CheckRecordID int64 `json:"check_record_id"`
|
|
ContentHash string `json:"content_hash"`
|
|
PolicyFingerprint string `json:"policy_fingerprint"`
|
|
AcknowledgedBy int64 `json:"acknowledged_by"`
|
|
AckViolationIds []int64 `json:"ack_violation_ids"`
|
|
ExpiresAt pgtype.Timestamptz `json:"expires_at"`
|
|
ConsumedAt pgtype.Timestamptz `json:"consumed_at"`
|
|
ConsumedByJobID pgtype.UUID `json:"consumed_by_job_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type ComplianceCheckRecord struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
ArticleID pgtype.Int8 `json:"article_id"`
|
|
ArticleVersionID pgtype.Int8 `json:"article_version_id"`
|
|
TargetPlatforms []string `json:"target_platforms"`
|
|
ContentHash string `json:"content_hash"`
|
|
PolicyFingerprint string `json:"policy_fingerprint"`
|
|
TriggerSource string `json:"trigger_source"`
|
|
EnforcementMode string `json:"enforcement_mode"`
|
|
HighestLevel pgtype.Text `json:"highest_level"`
|
|
Passed bool `json:"passed"`
|
|
HitCount int32 `json:"hit_count"`
|
|
StoredHitCount int32 `json:"stored_hit_count"`
|
|
Truncated bool `json:"truncated"`
|
|
DictVersions []byte `json:"dict_versions"`
|
|
LlmUsed bool `json:"llm_used"`
|
|
DurationMs int32 `json:"duration_ms"`
|
|
CheckedBy pgtype.Int8 `json:"checked_by"`
|
|
CheckedAt pgtype.Timestamptz `json:"checked_at"`
|
|
ManualReviewStatus string `json:"manual_review_status"`
|
|
ManualReviewID pgtype.Int8 `json:"manual_review_id"`
|
|
}
|
|
|
|
type ComplianceManualReview struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
ArticleID int64 `json:"article_id"`
|
|
ArticleVersionID int64 `json:"article_version_id"`
|
|
OriginalCheckRecordID pgtype.Int8 `json:"original_check_record_id"`
|
|
OriginalContentHash string `json:"original_content_hash"`
|
|
OriginalPolicyFingerprint string `json:"original_policy_fingerprint"`
|
|
OriginalTargetPlatforms []string `json:"original_target_platforms"`
|
|
OriginalViolationSummary []byte `json:"original_violation_summary"`
|
|
RequestedBy int64 `json:"requested_by"`
|
|
RequestedAt pgtype.Timestamptz `json:"requested_at"`
|
|
RequestNote pgtype.Text `json:"request_note"`
|
|
Status string `json:"status"`
|
|
CancelledBy pgtype.Int8 `json:"cancelled_by"`
|
|
CancelledAt pgtype.Timestamptz `json:"cancelled_at"`
|
|
CancelReason pgtype.Text `json:"cancel_reason"`
|
|
ReviewedBy pgtype.Int8 `json:"reviewed_by"`
|
|
ReviewedAt pgtype.Timestamptz `json:"reviewed_at"`
|
|
DecisionReason pgtype.Text `json:"decision_reason"`
|
|
}
|
|
|
|
type ComplianceReviewJob struct {
|
|
ID int64 `json:"id"`
|
|
MessageID pgtype.UUID `json:"message_id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
ArticleID int64 `json:"article_id"`
|
|
ArticleVersionID int64 `json:"article_version_id"`
|
|
CheckRecordID int64 `json:"check_record_id"`
|
|
Status string `json:"status"`
|
|
Attempts int32 `json:"attempts"`
|
|
AvailableAt pgtype.Timestamptz `json:"available_at"`
|
|
LockedAt pgtype.Timestamptz `json:"locked_at"`
|
|
LockedBy pgtype.Text `json:"locked_by"`
|
|
LastError pgtype.Text `json:"last_error"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type ComplianceViolation struct {
|
|
ID int64 `json:"id"`
|
|
RecordID int64 `json:"record_id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
PlatformCode pgtype.Text `json:"platform_code"`
|
|
Source string `json:"source"`
|
|
DictionaryCode pgtype.Text `json:"dictionary_code"`
|
|
DictionaryName pgtype.Text `json:"dictionary_name"`
|
|
TermPattern pgtype.Text `json:"term_pattern"`
|
|
MatchedText string `json:"matched_text"`
|
|
StartOffset int32 `json:"start_offset"`
|
|
EndOffset int32 `json:"end_offset"`
|
|
DomPath pgtype.Text `json:"dom_path"`
|
|
Level string `json:"level"`
|
|
Hint pgtype.Text `json:"hint"`
|
|
ReferenceLaw pgtype.Text `json:"reference_law"`
|
|
AcknowledgedInAckID pgtype.Int8 `json:"acknowledged_in_ack_id"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type DesktopClient struct {
|
|
ID pgtype.UUID `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
UserID int64 `json:"user_id"`
|
|
TokenHash []byte `json:"token_hash"`
|
|
DeviceName pgtype.Text `json:"device_name"`
|
|
Os pgtype.Text `json:"os"`
|
|
CpuArch pgtype.Text `json:"cpu_arch"`
|
|
ClientVersion pgtype.Text `json:"client_version"`
|
|
Channel pgtype.Text `json:"channel"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
LastSeenAt pgtype.Timestamptz `json:"last_seen_at"`
|
|
LastRotatedAt pgtype.Timestamptz `json:"last_rotated_at"`
|
|
RevokedAt pgtype.Timestamptz `json:"revoked_at"`
|
|
}
|
|
|
|
type DesktopClientPrimaryLease struct {
|
|
TenantID int64 `json:"tenant_id"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
PrimaryClientID pgtype.UUID `json:"primary_client_id"`
|
|
LeaseExpiresAt pgtype.Timestamptz `json:"lease_expires_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type DesktopPublishJob struct {
|
|
ID int64 `json:"id"`
|
|
DesktopID pgtype.UUID `json:"desktop_id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
CreatedByUserID int64 `json:"created_by_user_id"`
|
|
Title string `json:"title"`
|
|
ContentRef []byte `json:"content_ref"`
|
|
ScheduledAt pgtype.Timestamptz `json:"scheduled_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
ArticleID pgtype.Int8 `json:"article_id"`
|
|
ArticleVersionID pgtype.Int8 `json:"article_version_id"`
|
|
Status string `json:"status"`
|
|
ComplianceBlockedRecordID pgtype.Int8 `json:"compliance_blocked_record_id"`
|
|
ComplianceBlockedAt pgtype.Timestamptz `json:"compliance_blocked_at"`
|
|
ComplianceBlockedReason pgtype.Text `json:"compliance_blocked_reason"`
|
|
}
|
|
|
|
type DesktopTask struct {
|
|
ID int64 `json:"id"`
|
|
DesktopID pgtype.UUID `json:"desktop_id"`
|
|
JobID pgtype.UUID `json:"job_id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
TargetAccountID pgtype.UUID `json:"target_account_id"`
|
|
TargetClientID pgtype.UUID `json:"target_client_id"`
|
|
PlatformID string `json:"platform_id"`
|
|
Kind string `json:"kind"`
|
|
Payload []byte `json:"payload"`
|
|
Status string `json:"status"`
|
|
DedupKey pgtype.Text `json:"dedup_key"`
|
|
ActiveAttemptID pgtype.UUID `json:"active_attempt_id"`
|
|
LeaseTokenHash []byte `json:"lease_token_hash"`
|
|
LeaseExpiresAt pgtype.Timestamptz `json:"lease_expires_at"`
|
|
Attempts int32 `json:"attempts"`
|
|
Result []byte `json:"result"`
|
|
Error []byte `json:"error"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
Priority int32 `json:"priority"`
|
|
Lane string `json:"lane"`
|
|
LaneWeight int32 `json:"lane_weight"`
|
|
Source string `json:"source"`
|
|
SchedulerGroupKey pgtype.Text `json:"scheduler_group_key"`
|
|
MonitorTaskID pgtype.Int8 `json:"monitor_task_id"`
|
|
SupersedesTaskID pgtype.UUID `json:"supersedes_task_id"`
|
|
ControlFlags []byte `json:"control_flags"`
|
|
InterruptGeneration int32 `json:"interrupt_generation"`
|
|
StartedAt pgtype.Timestamptz `json:"started_at"`
|
|
InterruptedAt pgtype.Timestamptz `json:"interrupted_at"`
|
|
InterruptReason pgtype.Text `json:"interrupt_reason"`
|
|
EnqueuedAt pgtype.Timestamptz `json:"enqueued_at"`
|
|
PublishSubmitStartedAt pgtype.Timestamptz `json:"publish_submit_started_at"`
|
|
}
|
|
|
|
type DesktopTaskAttempt struct {
|
|
ID int64 `json:"id"`
|
|
DesktopID pgtype.UUID `json:"desktop_id"`
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
ClientID pgtype.UUID `json:"client_id"`
|
|
LeaseTokenHash []byte `json:"lease_token_hash"`
|
|
StartedAt pgtype.Timestamptz `json:"started_at"`
|
|
EndedAt pgtype.Timestamptz `json:"ended_at"`
|
|
FinalStatus pgtype.Text `json:"final_status"`
|
|
Error []byte `json:"error"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|
|
|
|
type DesktopTaskTrace struct {
|
|
TaskID pgtype.UUID `json:"task_id"`
|
|
AttemptID pgtype.UUID `json:"attempt_id"`
|
|
Size pgtype.Int8 `json:"size"`
|
|
UploadedAt pgtype.Timestamptz `json:"uploaded_at"`
|
|
ObjectKey pgtype.Text `json:"object_key"`
|
|
}
|
|
|
|
type EnterpriseSiteCategory struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
ConnectionID int64 `json:"connection_id"`
|
|
RemoteID string `json:"remote_id"`
|
|
ParentRemoteID pgtype.Text `json:"parent_remote_id"`
|
|
Name string `json:"name"`
|
|
Slug pgtype.Text `json:"slug"`
|
|
RawPayloadJson []byte `json:"raw_payload_json"`
|
|
SyncedAt pgtype.Timestamptz `json:"synced_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type EnterpriseSiteConnection struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
CreatedByUserID int64 `json:"created_by_user_id"`
|
|
Name string `json:"name"`
|
|
SiteUrl string `json:"site_url"`
|
|
CmsType string `json:"cms_type"`
|
|
AuthType string `json:"auth_type"`
|
|
Appid string `json:"appid"`
|
|
CredentialCiphertext string `json:"credential_ciphertext"`
|
|
DefaultAcode pgtype.Text `json:"default_acode"`
|
|
DefaultMcode pgtype.Text `json:"default_mcode"`
|
|
DefaultScode pgtype.Text `json:"default_scode"`
|
|
Status string `json:"status"`
|
|
PluginVersion pgtype.Text `json:"plugin_version"`
|
|
SiteName pgtype.Text `json:"site_name"`
|
|
LastPingAt pgtype.Timestamptz `json:"last_ping_at"`
|
|
LastSyncAt pgtype.Timestamptz `json:"last_sync_at"`
|
|
LastPublishAt pgtype.Timestamptz `json:"last_publish_at"`
|
|
LastError pgtype.Text `json:"last_error"`
|
|
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"`
|
|
LeaseToken pgtype.Text `json:"lease_token"`
|
|
LeaseOwner pgtype.Text `json:"lease_owner"`
|
|
LeaseExpiresAt pgtype.Timestamptz `json:"lease_expires_at"`
|
|
AttemptCount int32 `json:"attempt_count"`
|
|
LastHeartbeatAt pgtype.Timestamptz `json:"last_heartbeat_at"`
|
|
}
|
|
|
|
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 KnowledgeDeletedCleanupEvent struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
KnowledgeItemID int64 `json:"knowledge_item_id"`
|
|
Status string `json:"status"`
|
|
AttemptCount int32 `json:"attempt_count"`
|
|
AvailableAt pgtype.Timestamptz `json:"available_at"`
|
|
LockedBy pgtype.Text `json:"locked_by"`
|
|
LockedAt pgtype.Timestamptz `json:"locked_at"`
|
|
LastError pgtype.Text `json:"last_error"`
|
|
CompletedAt pgtype.Timestamptz `json:"completed_at"`
|
|
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"`
|
|
PromptAssetKey pgtype.Text `json:"prompt_asset_key"`
|
|
SchemaJson []byte `json:"schema_json"`
|
|
CardConfigJson []byte `json:"card_config_json"`
|
|
PromptContent pgtype.Text `json:"prompt_content"`
|
|
}
|
|
|
|
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"`
|
|
PromptContent pgtype.Text `json:"prompt_content"`
|
|
}
|
|
|
|
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 MediaSupplyOrder struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
BrandID int64 `json:"brand_id"`
|
|
UserID int64 `json:"user_id"`
|
|
ArticleID pgtype.Int8 `json:"article_id"`
|
|
Supplier string `json:"supplier"`
|
|
ModelID int32 `json:"model_id"`
|
|
Status string `json:"status"`
|
|
Title string `json:"title"`
|
|
ContentSnapshot string `json:"content_snapshot"`
|
|
Remark pgtype.Text `json:"remark"`
|
|
OrderBrand pgtype.Text `json:"order_brand"`
|
|
ExternalOrderID pgtype.Text `json:"external_order_id"`
|
|
ExternalOrderCode pgtype.Text `json:"external_order_code"`
|
|
SupplierStatus pgtype.Text `json:"supplier_status"`
|
|
CostTotalCents int64 `json:"cost_total_cents"`
|
|
SellTotalCents int64 `json:"sell_total_cents"`
|
|
WalletDebitCents int64 `json:"wallet_debit_cents"`
|
|
WalletDebitedAt pgtype.Timestamptz `json:"wallet_debited_at"`
|
|
WalletRefundedAt pgtype.Timestamptz `json:"wallet_refunded_at"`
|
|
RequestPayloadJson []byte `json:"request_payload_json"`
|
|
ResponsePayloadJson []byte `json:"response_payload_json"`
|
|
ErrorMessage pgtype.Text `json:"error_message"`
|
|
AttemptCount int32 `json:"attempt_count"`
|
|
NextAttemptAt pgtype.Timestamptz `json:"next_attempt_at"`
|
|
QueuedAt pgtype.Timestamptz `json:"queued_at"`
|
|
SubmittedAt pgtype.Timestamptz `json:"submitted_at"`
|
|
CompletedAt pgtype.Timestamptz `json:"completed_at"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
type MediaSupplyOrderItem struct {
|
|
ID int64 `json:"id"`
|
|
OrderID int64 `json:"order_id"`
|
|
ResourceID int64 `json:"resource_id"`
|
|
SupplierResourceID string `json:"supplier_resource_id"`
|
|
PriceType string `json:"price_type"`
|
|
ResourceNameSnapshot string `json:"resource_name_snapshot"`
|
|
LockedCostPriceCents int64 `json:"locked_cost_price_cents"`
|
|
LockedSellPriceCents int64 `json:"locked_sell_price_cents"`
|
|
Status string `json:"status"`
|
|
ExternalArticleUrl pgtype.Text `json:"external_article_url"`
|
|
RawJson []byte `json:"raw_json"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type MediaSupplySyncJob struct {
|
|
ID int64 `json:"id"`
|
|
Supplier string `json:"supplier"`
|
|
ModelID pgtype.Int4 `json:"model_id"`
|
|
Status string `json:"status"`
|
|
RequestedBy pgtype.Int8 `json:"requested_by"`
|
|
StartedAt pgtype.Timestamptz `json:"started_at"`
|
|
FinishedAt pgtype.Timestamptz `json:"finished_at"`
|
|
ErrorMessage pgtype.Text `json:"error_message"`
|
|
AttemptCount int32 `json:"attempt_count"`
|
|
StatsJson []byte `json:"stats_json"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type MediaSupplyUserWallet struct {
|
|
TenantID int64 `json:"tenant_id"`
|
|
UserID int64 `json:"user_id"`
|
|
BalanceCents int64 `json:"balance_cents"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type MediaSupplyWalletLedger struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
UserID int64 `json:"user_id"`
|
|
OrderID pgtype.Int8 `json:"order_id"`
|
|
DeltaCents int64 `json:"delta_cents"`
|
|
BalanceAfterCents int64 `json:"balance_after_cents"`
|
|
Reason string `json:"reason"`
|
|
Note pgtype.Text `json:"note"`
|
|
CreatedBy pgtype.Int8 `json:"created_by"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_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"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
DesktopID pgtype.UUID `json:"desktop_id"`
|
|
ClientID pgtype.UUID `json:"client_id"`
|
|
AccountFingerprint pgtype.Text `json:"account_fingerprint"`
|
|
DisplayName string `json:"display_name"`
|
|
Health string `json:"health"`
|
|
VerifiedAt pgtype.Timestamptz `json:"verified_at"`
|
|
Tags []byte `json:"tags"`
|
|
SyncVersion int64 `json:"sync_version"`
|
|
DeleteRequestedAt pgtype.Timestamptz `json:"delete_requested_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 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"`
|
|
BrandID int64 `json:"brand_id"`
|
|
}
|
|
|
|
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"`
|
|
BrandID int64 `json:"brand_id"`
|
|
}
|
|
|
|
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 pgtype.Int8 `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"`
|
|
TargetType string `json:"target_type"`
|
|
TargetConnectionID pgtype.Int8 `json:"target_connection_id"`
|
|
}
|
|
|
|
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 pgtype.Int8 `json:"prompt_rule_id"`
|
|
BrandID pgtype.Int8 `json:"brand_id"`
|
|
Name string `json:"name"`
|
|
CronExpr string `json:"cron_expr"`
|
|
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"`
|
|
WorkspaceID pgtype.Int8 `json:"workspace_id"`
|
|
AutoPublish bool `json:"auto_publish"`
|
|
PublishAccountIds []byte `json:"publish_account_ids"`
|
|
CoverAssetUrl pgtype.Text `json:"cover_asset_url"`
|
|
CoverImageAssetID pgtype.Int8 `json:"cover_image_asset_id"`
|
|
TargetType string `json:"target_type"`
|
|
SubscriptionPromptID pgtype.Int8 `json:"subscription_prompt_id"`
|
|
ScheduleKind string `json:"schedule_kind"`
|
|
ScheduleDays []byte `json:"schedule_days"`
|
|
ScheduleTimeMode string `json:"schedule_time_mode"`
|
|
RandomWindowStart pgtype.Time `json:"random_window_start"`
|
|
RandomWindowEnd pgtype.Time `json:"random_window_end"`
|
|
GenerationInputJson []byte `json:"generation_input_json"`
|
|
LastRunAt pgtype.Timestamptz `json:"last_run_at"`
|
|
LastDispatchStatus pgtype.Text `json:"last_dispatch_status"`
|
|
LastDispatchError pgtype.Text `json:"last_dispatch_error"`
|
|
ConsecutiveFailures int32 `json:"consecutive_failures"`
|
|
PublishEnterpriseSiteTargets []byte `json:"publish_enterprise_site_targets"`
|
|
}
|
|
|
|
type SupplierMediaPriceOverride struct {
|
|
ID int64 `json:"id"`
|
|
ResourceID int64 `json:"resource_id"`
|
|
PriceType string `json:"price_type"`
|
|
SellPriceCents int64 `json:"sell_price_cents"`
|
|
Enabled bool `json:"enabled"`
|
|
UpdatedBy pgtype.Int8 `json:"updated_by"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type SupplierMediaResource struct {
|
|
ID int64 `json:"id"`
|
|
Supplier string `json:"supplier"`
|
|
SupplierResourceID string `json:"supplier_resource_id"`
|
|
ModelID int32 `json:"model_id"`
|
|
Name string `json:"name"`
|
|
Status string `json:"status"`
|
|
CostPriceCents int64 `json:"cost_price_cents"`
|
|
CostPricesJson []byte `json:"cost_prices_json"`
|
|
SalePriceLabel pgtype.Text `json:"sale_price_label"`
|
|
ResourceUrl pgtype.Text `json:"resource_url"`
|
|
BaiduWeight pgtype.Int4 `json:"baidu_weight"`
|
|
ResourceRemark pgtype.Text `json:"resource_remark"`
|
|
CustomerVisible bool `json:"customer_visible"`
|
|
ChannelType pgtype.Text `json:"channel_type"`
|
|
Region pgtype.Text `json:"region"`
|
|
InclusionEffect pgtype.Text `json:"inclusion_effect"`
|
|
LinkType pgtype.Text `json:"link_type"`
|
|
PublishRate pgtype.Text `json:"publish_rate"`
|
|
DeliverySpeed pgtype.Text `json:"delivery_speed"`
|
|
SupplierUpdatedAt pgtype.Timestamptz `json:"supplier_updated_at"`
|
|
LastSyncedAt pgtype.Timestamptz `json:"last_synced_at"`
|
|
RawJson []byte `json:"raw_json"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
DeletedAt pgtype.Timestamptz `json:"deleted_at"`
|
|
}
|
|
|
|
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"`
|
|
PrimaryClientID pgtype.UUID `json:"primary_client_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"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
}
|
|
|
|
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 pgtype.Text `json:"email"`
|
|
Phone string `json:"phone"`
|
|
PasswordHash string `json:"password_hash"`
|
|
Name pgtype.Text `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"`
|
|
}
|
|
|
|
type Workspace struct {
|
|
ID int64 `json:"id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
Name string `json:"name"`
|
|
Slug string `json:"slug"`
|
|
IsDefault bool `json:"is_default"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
UpdatedAt pgtype.Timestamptz `json:"updated_at"`
|
|
}
|
|
|
|
type WorkspaceMembership struct {
|
|
ID int64 `json:"id"`
|
|
WorkspaceID int64 `json:"workspace_id"`
|
|
UserID int64 `json:"user_id"`
|
|
TenantID int64 `json:"tenant_id"`
|
|
Role string `json:"role"`
|
|
IsPrimary bool `json:"is_primary"`
|
|
CreatedAt pgtype.Timestamptz `json:"created_at"`
|
|
}
|