/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/commands/src/create-from-template.command.ts
27 строк
911 B
nichenqin
feat: login to create template
30 сен 2024, 06:37
30 сен 2024, 06:37
ffe01de
Код
Авторство
О чём код?
import { baseIdSchema } from "@undb/base" import { Command, type CommandProps } from "@undb/domain" import { createFromTemplateDTO } from "@undb/template" import { z } from "@undb/zod" export const createFromTemplateCommand = createFromTemplateDTO export type ICreateFromTemplateCommand = z.infer<typeof createFromTemplateCommand> export const createFromTemplateCommandOutput = z.object({ baseIds: z.array(baseIdSchema), }) export type ICreateFromTemplateCommandOutput = z.infer<typeof createFromTemplateCommandOutput> export class CreateFromTemplateCommand extends Command implements ICreateFromTemplateCommand { public readonly id: string public readonly includeData?: boolean public readonly spaceId?: string constructor(props: CommandProps<ICreateFromTemplateCommand>) { super(props) this.id = props.id this.includeData = props.includeData this.spaceId = props.spaceId } }