package com.bonus.canteen.core.device.manage.factory;


import com.bonus.canteen.core.device.manage.model.metadata.*;
import com.bonus.canteen.core.common.enums.SourceTypeEnum;

public class DeviceMtadataFactory {
   public static BaseMetadate createMetadata(Integer deviceType) {
      BaseMetadate baseMetadate = null;
      SourceTypeEnum sourceTypeEnum = SourceTypeEnum.getByDesc(deviceType);
      switch (sourceTypeEnum) {
         case ANDROID_DINING_TABLE:
            baseMetadate = new ConsumTableMetadate();
            break;
         case PRINTER:
            baseMetadate = new PrinterMetadata();
            break;
         case AUTONOMOUS_WEIGHING:
            baseMetadate = new WeightMetadata();
            break;
         case MEAL_LOCKER:
            baseMetadate = new TakeFoodCabinetMetadata();
            break;
         case BUFFET:
            baseMetadate = new SelfOrderServiceMetadate();
            break;
         case HANDHELD:
         case VERTICAL_CONSUME:
         case PAYMENT_POS:
         case ANDROID_DUAL_SCREEN:
         case ANDROID_HANG_CONSUMER:
            baseMetadate = new ConsumOrderMetadate();
            break;
         case AI_DISHES_RECOGNIZER:
            baseMetadate = new ConsumTableAiMetadate();
            break;
         case ANDROID_SELF_RECHARGE:
            baseMetadate = new SelfServiceMetadate();
            break;
         case WEIGHT_MARGIN_BOARD:
            baseMetadate = new BuffetMarginBoardMetadata();
            break;
         case AI_ELECTRONIC_SCALE:
            baseMetadate = new AIWeightScaleMetadate();
            break;
         case WEIGHT_PRODUCTION_IN_ONE:
            baseMetadate = new WeightProductionInOneMetadata();
            break;
         case ANDROID_BINDING:
            baseMetadate = new WeightBindMetadata();
            break;
         case ISSUE:
            baseMetadate = new IssueMetadata();
            break;
         case PERSON_FLOW_DETECTOR:
            baseMetadate = new PassengerFlowMetadata();
            break;
         case AI_DISHES_UTENSIL_RECOGNIZER:
            baseMetadate = new ConsumTableAiUtensilMetadate();
            break;
         case FRESH_CABINET:
            baseMetadate = new FreshCabinetMetadata();
            break;
         case SMART_WEIGHT_CONTAINER:
            baseMetadate = new SmartWeightContainerMetadata();
            break;
         case DISHES_AI:
            baseMetadate = new BaseMetadate();
            break;
         default:
            baseMetadate = new BaseMetadate();
      }

      return (BaseMetadate)baseMetadate;
   }
}
