add phone
This commit is contained in:
@@ -50,6 +50,11 @@ export class CreateRestaurantDto {
|
|||||||
@IsString()
|
@IsString()
|
||||||
phoneNumber?: string;
|
phoneNumber?: string;
|
||||||
|
|
||||||
|
@ApiPropertyOptional({ example: '09123456789', description: 'شماره تلفن' })
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
phone?: string;
|
||||||
|
|
||||||
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza', description: 'آدرس اینستاگرام' })
|
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza', description: 'آدرس اینستاگرام' })
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsUrl()
|
@IsUrl()
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ export class RestaurantSpecificationDto {
|
|||||||
@ApiPropertyOptional({ example: '+989123456789', description: 'Phone number' })
|
@ApiPropertyOptional({ example: '+989123456789', description: 'Phone number' })
|
||||||
phoneNumber?: string;
|
phoneNumber?: string;
|
||||||
|
|
||||||
|
@ApiPropertyOptional({ example: '09123456789', description: 'Phone' })
|
||||||
|
phone?: string;
|
||||||
|
|
||||||
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza', description: 'Instagram URL' })
|
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza', description: 'Instagram URL' })
|
||||||
instagram?: string;
|
instagram?: string;
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ export class Restaurant extends BaseEntity {
|
|||||||
@Property({ nullable: true })
|
@Property({ nullable: true })
|
||||||
phoneNumber?: string;
|
phoneNumber?: string;
|
||||||
|
|
||||||
|
@Property({ nullable: true })
|
||||||
|
phone?: string;
|
||||||
|
|
||||||
@Property({ nullable: true })
|
@Property({ nullable: true })
|
||||||
instagram?: string;
|
instagram?: string;
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ export class RestaurantsService {
|
|||||||
serviceArea: restaurant.serviceArea,
|
serviceArea: restaurant.serviceArea,
|
||||||
establishedYear: restaurant.establishedYear,
|
establishedYear: restaurant.establishedYear,
|
||||||
phoneNumber: restaurant.phoneNumber,
|
phoneNumber: restaurant.phoneNumber,
|
||||||
|
phone: restaurant.phone,
|
||||||
instagram: restaurant.instagram,
|
instagram: restaurant.instagram,
|
||||||
telegram: restaurant.telegram,
|
telegram: restaurant.telegram,
|
||||||
whatsapp: restaurant.whatsapp,
|
whatsapp: restaurant.whatsapp,
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ export class DatabaseSeeder extends Seeder {
|
|||||||
name: 'ژیوان',
|
name: 'ژیوان',
|
||||||
slug: 'zhivan',
|
slug: 'zhivan',
|
||||||
isActive: true,
|
isActive: true,
|
||||||
|
phone: '09123456789',
|
||||||
});
|
});
|
||||||
em.persist(restaurant);
|
em.persist(restaurant);
|
||||||
}
|
}
|
||||||
@@ -122,6 +123,7 @@ export class DatabaseSeeder extends Seeder {
|
|||||||
name: 'بوته',
|
name: 'بوته',
|
||||||
slug: 'boote',
|
slug: 'boote',
|
||||||
isActive: true,
|
isActive: true,
|
||||||
|
phone: '09123456790',
|
||||||
});
|
});
|
||||||
em.persist(restaurant);
|
em.persist(restaurant);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user