/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/commands/src/create-record.command.ts
29 строк
1001 B
nichenqin
fix: kanban move issue
24 сен 2024, 12:06
24 сен 2024, 12:06
611dd11
Код
Авторство
О чём код?
import { Command, type CommandProps } from "@undb/domain" import type { IRecordValues } from "@undb/table" import { createRecordDTO, recordId, uniqueTableDTO } from "@undb/table" import { z } from "@undb/zod" export const createRecordCommand = createRecordDTO.merge(uniqueTableDTO) export type ICreateRecordCommand = z.infer<typeof createRecordCommand> export const createRecordCommandOutput = recordId export type ICreateRecordCommandOutput = z.infer<typeof createRecordCommandOutput> export class CreateRecordCommand extends Command implements ICreateRecordCommand { public readonly id?: string | null public readonly tableId?: string public readonly baseName?: string public readonly tableName?: string public readonly values: IRecordValues constructor(props: CommandProps<ICreateRecordCommand>) { super(props) this.id = props.id this.tableId = props.tableId this.baseName = props.baseName this.tableName = props.tableName this.values = props.values } }