-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: ensure parity between front-end and back-end dto
- Loading branch information
Showing
117 changed files
with
395 additions
and
416 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,26 @@ | ||
import { ApiHideProperty, ApiProperty } from '@nestjs/swagger'; | ||
import { | ||
Entity, | ||
PrimaryKey, | ||
Property, | ||
SerializedPrimaryKey, | ||
} from '@mikro-orm/core'; | ||
import { ObjectId } from 'mongodb'; | ||
import { Transform } from 'class-transformer'; | ||
import { Type } from 'class-transformer'; | ||
import { IsString, IsDefined, IsDate } from 'class-validator'; | ||
import { VertexDto } from './vertex.dto'; | ||
import { EdgeDto } from './edge.dto'; | ||
|
||
@Entity({ tableName: 'graphRequestDto' }) | ||
export class GraphRequestDto { | ||
@ApiHideProperty() | ||
@Transform((value) => | ||
value.obj.id ? new ObjectId(value.obj.id.toString()) : null, | ||
) | ||
@PrimaryKey() | ||
@Property() | ||
_id: ObjectId; | ||
@IsString() | ||
@IsDefined() | ||
id!: string; | ||
|
||
@SerializedPrimaryKey() | ||
id!: string; // won't be saved in the database | ||
@IsDate() | ||
@IsDefined() | ||
@Type(() => Date) | ||
created!: Date; | ||
|
||
@Property() | ||
created: Date; | ||
@IsString() | ||
@IsDefined() | ||
type!: 'edge' | 'vertex'; | ||
|
||
@Property() | ||
type: 'edge' | 'vertex'; | ||
@IsDefined() | ||
data!: Omit<EdgeDto, 'id'> | Omit<VertexDto, 'id'>; | ||
|
||
@Property() | ||
data: Omit<EdgeDto, 'id'> | Omit<VertexDto, 'id'>; | ||
|
||
@Property() | ||
@ApiProperty({ type: () => String }) | ||
@Transform((value) => | ||
value.obj.requestor ? new ObjectId(value.obj.requestor.toString()) : null, | ||
) | ||
requestor: ObjectId; | ||
@IsString() | ||
@IsDefined() | ||
requestor!: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export class GroupRegistryByAccountDto { | ||
_id: { accountId: string }; | ||
createdAt: Date[]; | ||
jti: string[]; | ||
blocked: boolean[]; | ||
_id!: { accountId: string }; | ||
createdAt!: Date[]; | ||
jti!: string[]; | ||
blocked!: boolean[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.