template.model.ts 908 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { PipelineRoute } from '../pipelines/pipeline-registry';
  2. export type TemplateScope = 'system' | 'user';
  3. export type TemplateCategory = '口播' | '产品种草' | '知识科普' | '影视感' | '带货' | '其他';
  4. export interface GenerationTemplatePreview {
  5. coverUrl?: string;
  6. samplePrompt?: string;
  7. sampleResultUrl?: string;
  8. }
  9. export interface GenerationTemplate {
  10. id: string;
  11. userId?: string;
  12. scope: TemplateScope;
  13. pipelineId: PipelineRoute;
  14. name: string;
  15. description?: string;
  16. category: TemplateCategory;
  17. tags: string[];
  18. config: Record<string, any>;
  19. preview?: GenerationTemplatePreview;
  20. version: number;
  21. usageCount: number;
  22. createdAt: string;
  23. updatedAt: string;
  24. }
  25. export type GenerationTemplateInput = Omit<
  26. GenerationTemplate,
  27. 'id' | 'userId' | 'scope' | 'version' | 'usageCount' | 'createdAt' | 'updatedAt'
  28. > & {
  29. id?: string;
  30. version?: number;
  31. };