mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 14:34:54 +00:00
added description
This commit is contained in:
@ -1,15 +1,15 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
||||||
|
|
||||||
export class ProjectDto {
|
export class ProjectDto {
|
||||||
@ApiProperty({
|
@IsString()
|
||||||
example: 'd7a44e8a-32d5-4f39-ae2e-013f1245aead',
|
@IsNotEmpty()
|
||||||
description: 'UUID of the project',
|
|
||||||
})
|
|
||||||
uuid: string;
|
uuid: string;
|
||||||
|
|
||||||
@ApiProperty({
|
@IsString()
|
||||||
example: 'Project 1',
|
@IsNotEmpty()
|
||||||
description: 'Name of the project',
|
|
||||||
})
|
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
@IsOptional()
|
||||||
|
public description?: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,6 +17,9 @@ export class ProjectEntity extends AbstractEntity<ProjectDto> {
|
|||||||
})
|
})
|
||||||
public name: string;
|
public name: string;
|
||||||
|
|
||||||
|
@Column({ length: 255, nullable: true })
|
||||||
|
description: string;
|
||||||
|
|
||||||
constructor(partial: Partial<ProjectEntity>) {
|
constructor(partial: Partial<ProjectEntity>) {
|
||||||
super();
|
super();
|
||||||
Object.assign(this, partial);
|
Object.assign(this, partial);
|
||||||
|
|||||||
Reference in New Issue
Block a user