38 lines
566 B
TypeScript
38 lines
566 B
TypeScript
import { ApiProperty } from '@nestjs/swagger';
|
|
import { Author, Image } from './types';
|
|
|
|
export class AuthRequest {
|
|
@ApiProperty()
|
|
login: string;
|
|
}
|
|
|
|
export class ImageCreateRequest {
|
|
@ApiProperty()
|
|
url: string;
|
|
}
|
|
|
|
export class AuthorResponse implements Author {
|
|
@ApiProperty()
|
|
login: string;
|
|
|
|
@ApiProperty()
|
|
token: string;
|
|
}
|
|
|
|
export class ImageResponse implements Image {
|
|
@ApiProperty()
|
|
url: string;
|
|
|
|
@ApiProperty()
|
|
author: string;
|
|
|
|
@ApiProperty()
|
|
likes: string[];
|
|
|
|
@ApiProperty()
|
|
id: string;
|
|
|
|
@ApiProperty()
|
|
create_at: string;
|
|
}
|