/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/commands/src/create-from-share.command.ts
28 строк
915 B
nichenqin
feat: rename create from template to create from share
21 сен 2024, 09:52
21 сен 2024, 09:52
919ad55
Код
Авторство
О чём код?
import { Command, type CommandProps } from "@undb/domain" import { shareIdSchema } from "@undb/share" import { spaceIdSchema } from "@undb/space" import { z } from "@undb/zod" export const createFromShareCommand = z.object({ shareId: shareIdSchema, targetSpaceId: spaceIdSchema.optional(), name: z.string().optional(), includeData: z.boolean().optional(), }) export type ICreateFromShareCommand = z.infer<typeof createFromShareCommand> export class CreateFromShareCommand extends Command implements ICreateFromShareCommand { public readonly shareId: string public readonly targetSpaceId?: string public readonly name?: string public readonly includeData?: boolean constructor(props: CommandProps<ICreateFromShareCommand>) { super(props) this.shareId = props.shareId this.targetSpaceId = props.targetSpaceId this.name = props.name this.includeData = props.includeData } }