change entity names
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { User } from '../../users/entities/user.entity';
|
||||
import type { Restaurant } from '../../restaurants/entities/restaurant.entity';
|
||||
import type { User } from '../../../users/entities/user.entity';
|
||||
import type { Shop } from ../../..shops/entities/shop.entity';
|
||||
|
||||
export interface UserLoginResponse {
|
||||
id: string;
|
||||
@@ -8,7 +8,7 @@ export interface UserLoginResponse {
|
||||
phone: string;
|
||||
|
||||
isActive?: boolean;
|
||||
restaurant: {
|
||||
shop: {
|
||||
id: string;
|
||||
name: string;
|
||||
slug: string;
|
||||
@@ -16,17 +16,17 @@ export interface UserLoginResponse {
|
||||
}
|
||||
|
||||
export class UserLoginTransformer {
|
||||
static transform(user: User, restaurant: Restaurant): UserLoginResponse {
|
||||
static transform(user: User, shop: Shop): UserLoginResponse {
|
||||
return {
|
||||
id: user.id,
|
||||
firstName: user.firstName,
|
||||
lastName: user.lastName,
|
||||
phone: user.phone,
|
||||
isActive: user.isActive,
|
||||
restaurant: {
|
||||
id: restaurant.id,
|
||||
name: restaurant.name,
|
||||
slug: restaurant.slug,
|
||||
shop: {
|
||||
id: shop.id,
|
||||
name: shop.name,
|
||||
slug: shop.slug,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user