package com.bonus.canteen.core.account.v3.metadata.service;

import com.bonus.canteen.core.account.v3.metadata.model.AccMetadataModel;
import com.bonus.canteen.core.allocation.api.AllocMetadataApi;
import com.bonus.canteen.core.common.enums.MetadataModelTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class AccMetadataService {
   @Resource
   @Lazy
   private AllocMetadataApi allocMetadataApi;

   public AccMetadataModel queryMetadata() {
      return (AccMetadataModel)this.allocMetadataApi.queryMetadataModel(MetadataModelTypeEnum.ACC, new AccMetadataModel());
   }
}
