package com.bonus.core.allocation.api;

import com.bonus.core.allocation.canteen.dto.AllocCanteenOrderDTO;
import com.bonus.core.common.enums.MetadataModelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component
public class AllocOrderMetadataApi {
   @Autowired
   @Lazy
   private GlobalMetadataApi globalMetadataApi;

   public AllocCanteenOrderDTO queryAvailableOrder(Long canteenId, Long stallId) {
      return (AllocCanteenOrderDTO)this.globalMetadataApi.getAvailableModel(MetadataModelTypeEnum.ORDER, new AllocCanteenOrderDTO(), canteenId, stallId);
   }
}
