Untitled

mail@pastecode.io avatar
unknown
javascript
2 years ago
3.1 kB
1
Indexable
Never
import { CreateImageDto } from 'src/modules/images/dto/create-image.dto';
import { CreateMenuDto } from 'src/modules/menus/dto/create-menu.dto';

export class CreateRevenueCenterDto {
  delivery_zone: any;
  delivery_setting: CreateDeliverySettingDto;
  description: string;
  directions_url: string;
  has_curbside: boolean;
  dayparts: CreateDaypartDto[];
  gratuity: CreateGratuityDto;
  images: CreateImageDto;
  is_new: boolean;
  is_outpost: boolean;
  is_parent: boolean;
  menu_pdf_url: string;
  name: string;
  revenue_center_type: string;
  slug: string;
  status: string;
  timezone: string;
  settings: CreateRevenueCenterSettingDto;
  address: CreateRevenueAddressDto;
  menu?: CreateMenuDto;
  tender_types: CreateTenderTypeDto;
  surcharges: CreateSurchargeDto[];
  taxes: CreateTaxDto[];
}

export class CreateTenderTypeDto {
  DELIVERY: string[];
  PICKUP: string[];
  WALKIN: string[];
}

export class CreateTaxDto {
  amount: string;
  display_order: string;
  is_active: boolean;
  is_optional: boolean;
  name: string;
  tax_type: string;
}

export class CreateRevenueCenterSettingDto {
  cutoff_time: string;
  delivery_day_ahead: boolean;
  pickup_day_ahead: boolean;
  excluded_times: CreateExcludedTimeDto;
  group_ordering: CreateGroupOrderingDto;
  delivery_holidays: string[];
  pickup_holidays: string[];
  lead_time_in_hours?: number;
  delivery_order_minimum: string;
  pickup_order_minimum: string;
  delivery_order_maximum: string;
  pickup_order_maximum: string;
  order_times?: string;
  service_types: string[];
  tax_exempt_is_allowed: boolean;
  delivery_time_range: number;
  pickup_time_range: number;
  delivery_wait_time: number;
  pickup_wait_time: number;
}

export class CreateExcludedTimeDto {
  date: string;
  minute: number[];
  service_type: string;
}

export class CreateGroupOrderingDto {
  guest_limit: number;
  lead_time: number;
  prep_time: number;
}

export class CreateRevenueAddressDto {
  city: string;
  cross_streets: string;
  lat: number;
  lng: number;
  phone: string;
  postal_code: string;
  state: string;
  street: string;
}

export class CreateDaypartDto {
  close: string;
  holiday: boolean;
  open: string;
  weekday: string;
  daypart: string;
  service_type: string;
}

export class CreateGratuityDto {
  increments: boolean;
  maximum: string;
  minimum: string;
  percentage: string;
  service_type: string;
}

export class CreateDeliverySettingDto {
  auto_confirm: boolean;
  confirm: boolean;
  fees: CreateFeeDto;
  max_gratuity: string;
  send_delay: number;
  send_updates: boolean;
  service_type: string;
  surcharge: CreateSurchargeDto;
}

export class CreateSurchargeDto {
  amount: string;
  approval: boolean;
  description: string;
  display_order: number;
  is_active: boolean;
  is_taxed: boolean;
  label: string;
  maximum: string;
  minimum: string;
  name: string;
  optional: boolean;
  order_size_maximum: string;
  order_size_minimum: string;
  service_type: string;
  surcharge_type: string;
  travel_type: string;
  revenue_center_id?: number;
}

export class CreateFeeDto {
  fee: string;
  maximum: string;
  minimum: string;
}