-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
111 additions
and
43 deletions.
There are no files selected for viewing
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,3 +1,4 @@ | ||
HOST= | ||
PORT= | ||
SALT= | ||
DB_HOST= | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
export const COMPONENT = { | ||
REST_APPLICATION: Symbol.for('RestApplication'), | ||
LOGGER: Symbol.for('Logger'), | ||
CONFIG: Symbol.for('Config'), | ||
DATABASE_CLIENT: Symbol.for('DatabaseClient'), | ||
USER_SERVICE: Symbol.for('UserService'), | ||
USER_MODEL: Symbol.for('UserModel'), | ||
OFFER_MODEL: Symbol.for('OfferModel'), | ||
OFFER_SERVICE: Symbol.for('OfferService'), | ||
COMMENT_MODEL: Symbol.for('CommentModel'), | ||
COMMENT_SERVICE: Symbol.for('CommentService'), | ||
OFFER_CONTROLLER: Symbol.for('OfferController'), | ||
EXCEPTION_FILTER: Symbol.for('ExceptionFilter'), | ||
USER_CONTROLLER: Symbol.for('UserController'), | ||
REST_APPLICATION: Symbol(), | ||
LOGGER: Symbol(), | ||
CONFIG: Symbol(), | ||
DATABASE_CLIENT: Symbol(), | ||
USER_SERVICE: Symbol(), | ||
USER_MODEL: Symbol(), | ||
OFFER_MODEL: Symbol(), | ||
OFFER_SERVICE: Symbol(), | ||
COMMENT_MODEL: Symbol(), | ||
COMMENT_SERVICE: Symbol(), | ||
OFFER_CONTROLLER:Symbol(), | ||
EXCEPTION_FILTER:Symbol(), | ||
USER_CONTROLLER: Symbol(), | ||
}; |
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,4 +1,5 @@ | ||
export type TRestSchema = { | ||
HOST: string; | ||
PORT: number; | ||
SALT: string; | ||
DB_HOST: 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Expose, Type } from 'class-transformer'; | ||
import { EFacilities, EHousing, TCoords } from '../../../types/index.js'; | ||
import { UserRDO } from '../../user/index.js'; | ||
|
||
export class ShortOfferRDO { | ||
@Expose({ name: '_id' }) | ||
public id!: string; | ||
|
||
@Expose() | ||
public createdAt!: string; | ||
|
||
@Expose() | ||
public title!: string; | ||
|
||
@Expose() | ||
public description!: string; | ||
|
||
@Expose() | ||
public city!: string; | ||
|
||
@Expose() | ||
public previewImagePath!: string; | ||
|
||
@Expose() | ||
public photos!: string[]; | ||
|
||
@Expose() | ||
public isPremium!: boolean; | ||
|
||
@Expose() | ||
public housingType!: EHousing; | ||
|
||
@Expose() | ||
public roomsNumber!: number; | ||
|
||
@Expose() | ||
public visitorsNumber!: number; | ||
|
||
@Expose() | ||
public price!: number; | ||
|
||
@Expose() | ||
public facilities!: EFacilities; | ||
|
||
@Expose() | ||
public coords!: TCoords; | ||
|
||
// TODO in next module | ||
// @Expose() | ||
// public commentsCount!: number; | ||
|
||
@Expose() | ||
@Type(() => UserRDO) | ||
public author!: UserRDO; | ||
} |
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,9 +1,9 @@ | ||
export { UserEntity, UserModel } from './user.entity.js'; | ||
export { CreateUserDTO } from './dto/create-user.dto.js'; | ||
export { UpdateUserDTO } from './dto/update-user.dto.js'; | ||
export { LoginUserDTO } from './dto/login-user.dto.js'; | ||
export { UserRDO } from './rdo/user.rdo.js'; | ||
export { UserEntity, UserModel } from './user.entity.js'; | ||
export { DefaultUserService } from './default-user.service.js'; | ||
export { createUserContainer } from './user.container.js'; | ||
export { populateFavorites } from './user.aggregation.js'; | ||
export { UserController } from './user.controller.js'; | ||
export { UserRDO } from './rdo/user.rdo.js'; |
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