All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 1m0s
- AI: 新三层架构 Provider→Gateway→Workflow(15文件,DeepSeek+MiniMax) - Auth: 全局JwtAuthGuard + @Public()装饰器白名单路由 - DB: 12个Repository从Map/Array迁到Prisma - Schema: 新增AiUsageLog、WaitlistEntry模型 - API: /api-docs-json加Basic Auth保护 - 清理: 删除infrastructure/ai、docs/旧文档 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
32 lines
822 B
TypeScript
32 lines
822 B
TypeScript
import { Injectable } from '@nestjs/common';
|
|
import { PrismaService } from '../../infrastructure/database/prisma.service';
|
|
|
|
@Injectable()
|
|
export class WaitlistRepository {
|
|
constructor(private readonly prisma: PrismaService) {}
|
|
|
|
async findAll() {
|
|
return this.prisma.waitlistEntry.findMany({ orderBy: { createdAt: 'desc' } });
|
|
}
|
|
|
|
async create(data: {
|
|
nickname: string;
|
|
email: string;
|
|
devices?: string[];
|
|
interests?: string[];
|
|
painpoint?: string;
|
|
willingBeta?: boolean;
|
|
}) {
|
|
return this.prisma.waitlistEntry.create({
|
|
data: {
|
|
nickname: data.nickname,
|
|
email: data.email,
|
|
devices: data.devices as any,
|
|
interests: data.interests as any,
|
|
painpoint: data.painpoint ?? '',
|
|
willingBeta: data.willingBeta ?? false,
|
|
},
|
|
});
|
|
}
|
|
}
|