Commit 43de69e0 authored by Дмитрий Малюгин's avatar Дмитрий Малюгин 🕓
Browse files

refactor: code with fix some mistakes about decorators or interfaces

parent 5934539f
Loading
Loading
Loading
Loading
+2.42 KiB (1.13 MiB)

File changed.

No diff preview for this file type.

+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
    "@nestjs/core": "^11.0.1",
    "@nestjs/platform-express": "^11.0.1",
    "@prisma/client": "^6.4.1",
    "class-validator": "^0.14.1",
    "cookie-parser": "^1.4.7",
    "cors": "^2.8.5",
    "dotenv": "^16.4.5",
+27 −25
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ model User {
  password       String
  email          String
  favorite_color String
  user_sheets    Json?
  access_token   String?
  refresh_token  String?
}
@@ -103,6 +102,9 @@ model Table {
  handlers              Json?
}

model TableColumns {
}

// model Setting {
//   setting_uuid  String @id @default(uuid())
//   setting_name  String @unique
+14 −3
Original line number Diff line number Diff line
import { ITableColumnDB, TDarkness, TSize, TThemeColor } from '../interfaces/entities.interfaces';
import {
  ITableColumnDB,
  TDarkness,
  TSize,
  TThemeColor,
} from '../interfaces/entities.interfaces';
import { IsArray, IsObject } from 'class-validator';

export interface EntityDBDTO {
export class EntityDBDTO {
  sheet_uuid?: string;
  entity_uuid: string;
  readonly entity_type: 'divider' | 'paragraph' | 'image' | 'table';
  entity_order?: number;
  entity_order: number;
  readonly divider_height?: number;
  readonly divider_type?: 'solid' | 'dashed' | 'dotted';
  title?: string | null;
@@ -16,10 +22,15 @@ export interface EntityDBDTO {
  image_path?: string;
  image_url?: string;
  readonly image_width?: number;
  readonly image_width_initial: number;
  readonly image_height?: number;
  readonly file_width_initial: number;
  readonly file_height_initial: number;
  readonly entity_position?: string;
  readonly entity_title_position?: string;
  readonly image_scale?: string;
  @IsArray()
  @IsObject({ each: true })
  readonly table_columns?: ITableColumnDB[];
  readonly table_data?: unknown[][];
  readonly multipleSort?: boolean;
+1 −1
Original line number Diff line number Diff line
export class SheetDTO {
  readonly user_uuid: string;
  sheet_uuid?: string;
  sheet_uuid: string;
  readonly sheet_title: string;
  sheet_icon?: string;
  sheet_children?: string[];
Loading