/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/commands/src/submit-form.command.ts
25 строк
838 B
nichenqin
feat: submit from form
14 сен 2024, 06:26
14 сен 2024, 06:26
874aea8
Код
Авторство
О чём код?
import { Command, type CommandProps } from "@undb/domain" import type { IRecordValues } from "@undb/table" import { submitFormDTO, uniqueTableDTO } from "@undb/table" import { z } from "@undb/zod" export const submitFormCommand = submitFormDTO.merge(uniqueTableDTO) export type ISubmitFormCommand = z.infer<typeof submitFormCommand> export class SubmitFormCommand extends Command implements ISubmitFormCommand { public readonly tableId?: string public readonly form: string public readonly baseName?: string public readonly tableName?: string public readonly values: IRecordValues constructor(props: CommandProps<ISubmitFormCommand>) { super(props) this.tableId = props.tableId this.form = props.form this.baseName = props.baseName this.tableName = props.tableName this.values = props.values } }