diff --git a/src/templates/n8nTemplates/PetFigurineTemplate.ts b/src/templates/n8nTemplates/PetFigurineTemplate.ts new file mode 100644 index 0000000..6ea0524 --- /dev/null +++ b/src/templates/n8nTemplates/PetFigurineTemplate.ts @@ -0,0 +1,23 @@ +import { N8nVideoGenerateTemplate } from '../n8nTemplate'; + +// 宠物手办模板 +export class PetFigurineTemplate extends N8nVideoGenerateTemplate { + readonly code = 'pet_figurine_v1'; + readonly name = '宠物手办'; + readonly description = '将宠物插图制作成1/7比例的商业化手办,展示在电脑桌上,并生成手办把玩视频'; + readonly creditCost = 30; + readonly version = '1.0.0'; + readonly input = 'https://cdn.roasmax.cn/upload/7cc18d70e9ba48bc8cadff7d3cdf62e1.png'; // 原始宠物插图示例 + readonly output = 'https://cdn.roasmax.cn/upload/02f5c251162043f28e9da8d984546f40.png'; // 输出手办图片示例 + readonly tags = ['宠物', '手办', '模型', '收藏', 'BANDAI', 'ZBrush', '视频生成']; + + // N8n模板特定属性 - 图片生成 + readonly imageModel = 'gemini-2.5-flash-image'; // nano banana 模型 + readonly imagePrompt = 'Create a 1/7 scale commercialized figure of the animal in the illustration, in a realistic style and environment. Place the figure on a computer desk, using a circular transparent acrylic base without any text. On the Macbook Pro screen, display the ZBrush modeling process of the figure in line mode. Next to the computer screen, place a BANDAI-style toy packaging box printed with the original artwork.'; + + // N8n模板特定属性 - 视频生成 + readonly videoModel = '302/MiniMax-Hailuo-02'; + readonly videoPrompt = '一双手拿起手办,在手里展示把玩'; + readonly duration = 6; // 6秒视频 + readonly aspectRatio = '9:16'; // 竖屏比例 +} diff --git a/src/templates/n8nTemplates/index.ts b/src/templates/n8nTemplates/index.ts index 9cdaf32..eeb46bd 100644 --- a/src/templates/n8nTemplates/index.ts +++ b/src/templates/n8nTemplates/index.ts @@ -1,3 +1,4 @@ export * from './PhotoRestoreTemplate'; export * from './close-eyes.template'; -export * from './CosplayRealPersonTemplate'; \ No newline at end of file +export * from './CosplayRealPersonTemplate'; +export * from './PetFigurineTemplate'; \ No newline at end of file diff --git a/src/templates/template.service.ts b/src/templates/template.service.ts index 6efb249..bd001ce 100644 --- a/src/templates/template.service.ts +++ b/src/templates/template.service.ts @@ -1,6 +1,6 @@ import { Injectable, OnModuleInit, Logger } from '@nestjs/common'; import { TemplateManager, Template } from './types'; -import { CloseEyesTemplate, PhotoRestoreTemplate, CosplayRealPersonTemplate } from './n8nTemplates'; +import { CloseEyesTemplate, PhotoRestoreTemplate, CosplayRealPersonTemplate, PetFigurineTemplate } from './n8nTemplates'; @Injectable() export class TemplateService implements OnModuleInit { @@ -73,6 +73,7 @@ export class TemplateService implements OnModuleInit { new PhotoRestoreTemplate(), new CloseEyesTemplate(), new CosplayRealPersonTemplate(), + new PetFigurineTemplate(), ]); } catch (error) { this.logger.error('模板初始化失败:', error);