mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-19 11:11:05 +10:00
Refactoring
* replace TypeORM with Kysely query builder * refactor migrations * other changes and fixes
This commit is contained in:
@ -3,7 +3,7 @@ import { IsOptional, IsString, IsUUID } from 'class-validator';
|
||||
export class CreatePageDto {
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
id?: string;
|
||||
pageId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
|
||||
@ -2,5 +2,5 @@ import { IsUUID } from 'class-validator';
|
||||
|
||||
export class DeletePageDto {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
pageId: string;
|
||||
}
|
||||
|
||||
@ -2,5 +2,5 @@ import { IsUUID } from 'class-validator';
|
||||
|
||||
export class HistoryDetailsDto {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
historyId: string;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ import { IsString, IsOptional, IsUUID } from 'class-validator';
|
||||
|
||||
export class MovePageDto {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
pageId: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
|
||||
@ -2,5 +2,5 @@ import { IsUUID } from 'class-validator';
|
||||
|
||||
export class PageDetailsDto {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
pageId: string;
|
||||
}
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import { Page } from '../entities/page.entity';
|
||||
import { Page } from '@docmost/db/types/entity.types';
|
||||
|
||||
export class PageWithOrderingDto extends Page {
|
||||
childrenIds?: string[];
|
||||
}
|
||||
export type PageWithOrderingDto = Page & { childrenIds?: string[] };
|
||||
|
||||
@ -4,5 +4,5 @@ import { IsUUID } from 'class-validator';
|
||||
|
||||
export class UpdatePageDto extends PartialType(CreatePageDto) {
|
||||
@IsUUID()
|
||||
id: string;
|
||||
pageId: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user