/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/commands/src/create-records.command.ts
27 строк
857 B
nichenqin
feat: openapi by name
25 июл 2024, 09:57
25 июл 2024, 09:57
5973432
Код
Авторство
О чём код?
import { Command, type CommandProps } from "@undb/domain" import type { ICreateRecordDTO } from "@undb/table" import { createRecordDTO, uniqueTableDTO } from "@undb/table" import { z } from "@undb/zod" export const createRecordsCommand = z .object({ records: createRecordDTO.array(), }) .merge(uniqueTableDTO) export type ICreateRecordsCommand = z.infer<typeof createRecordsCommand> export class CreateRecordsCommand extends Command implements ICreateRecordsCommand { public readonly tableId?: string public readonly tableName?: string public readonly baseName?: string public readonly records: ICreateRecordDTO[] constructor(props: CommandProps<ICreateRecordsCommand>) { super(props) this.tableId = props.tableId this.tableName = props.tableName this.baseName = props.baseName this.records = props.records } }