/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/commands/src/set-view-sort.command.ts
20 строк
626 B
nichenqin
feat: custom zod error map
21 май 2024, 08:06
21 май 2024, 08:06
7260528
Код
Авторство
О чём код?
import { Command, type CommandProps } from "@undb/domain" import { setViewSortDTO, type IViewSort } from "@undb/table" import { z } from "@undb/zod" export const setViewSortCommand = setViewSortDTO export type ISetViewSortCommand = z.infer<typeof setViewSortCommand> export class SetViewSortCommand extends Command implements ISetViewSortCommand { public readonly tableId: string public readonly viewId?: string public readonly sort: IViewSort constructor(props: CommandProps<ISetViewSortCommand>) { super(props) this.tableId = props.tableId this.viewId = props.viewId this.sort = props.sort } }