/
dimamir
/
undb
Обзор
Документация
Войти
/
dimamir
/
undb
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/commands/src/create-view-widget.command.ts
22 строки
714 B
nichenqin
feat: init chart
10 окт 2024, 09:46
10 окт 2024, 09:46
21b993e
Код
Авторство
О чём код?
import { Command, type CommandProps } from "@undb/domain" import { createViewWidgetDTO, tableId, type IWidgetDTO } from "@undb/table" import { z } from "@undb/zod" export const createViewWidgetCommand = createViewWidgetDTO.extend({ tableId: tableId, }) export type ICreateViewWidgetCommand = z.infer<typeof createViewWidgetCommand> export class CreateViewWidgetCommand extends Command implements ICreateViewWidgetCommand { public readonly tableId: string public readonly viewId: string public readonly widget: IWidgetDTO constructor(props: CommandProps<ICreateViewWidgetCommand>) { super(props) this.tableId = props.tableId this.viewId = props.viewId this.widget = props.widget } }