add phone

This commit is contained in:
2025-11-22 15:48:50 +03:30
parent 90e2877fab
commit 23dc27e611
5 changed files with 14 additions and 0 deletions
@@ -50,6 +50,11 @@ export class CreateRestaurantDto {
@IsString()
phoneNumber?: string;
@ApiPropertyOptional({ example: '09123456789', description: 'شماره تلفن' })
@IsOptional()
@IsString()
phone?: string;
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza', description: 'آدرس اینستاگرام' })
@IsOptional()
@IsUrl()
@@ -34,6 +34,9 @@ export class RestaurantSpecificationDto {
@ApiPropertyOptional({ example: '+989123456789', description: 'Phone number' })
phoneNumber?: string;
@ApiPropertyOptional({ example: '09123456789', description: 'Phone' })
phone?: string;
@ApiPropertyOptional({ example: 'https://instagram.com/cafemorteza', description: 'Instagram URL' })
instagram?: string;
@@ -40,6 +40,9 @@ export class Restaurant extends BaseEntity {
@Property({ nullable: true })
phoneNumber?: string;
@Property({ nullable: true })
phone?: string;
@Property({ nullable: true })
instagram?: string;
@@ -63,6 +63,7 @@ export class RestaurantsService {
serviceArea: restaurant.serviceArea,
establishedYear: restaurant.establishedYear,
phoneNumber: restaurant.phoneNumber,
phone: restaurant.phone,
instagram: restaurant.instagram,
telegram: restaurant.telegram,
whatsapp: restaurant.whatsapp,
+2
View File
@@ -112,6 +112,7 @@ export class DatabaseSeeder extends Seeder {
name: 'ژیوان',
slug: 'zhivan',
isActive: true,
phone: '09123456789',
});
em.persist(restaurant);
}
@@ -122,6 +123,7 @@ export class DatabaseSeeder extends Seeder {
name: 'بوته',
slug: 'boote',
isActive: true,
phone: '09123456790',
});
em.persist(restaurant);
}