package com.bonus.canteen.core.common.custom.business;

import cn.hutool.core.collection.CollUtil;

import java.util.List;

public interface CustomBusiness {
   default String name() {
      return "订单定制业务";
   }

   default List<Version> versions() {
      return CollUtil.newArrayList(new Version[0]);
   }

   default Version customVersion() {
      return null;
   }

   public static class Version {
      private String code;
      private String desc;

      public String getCode() {
         return this.code;
      }

      public String getDesc() {
         return this.desc;
      }

      public void setCode(final String code) {
         this.code = code;
      }

      public void setDesc(final String desc) {
         this.desc = desc;
      }

      private Version(final String code, final String desc) {
         this.code = code;
         this.desc = desc;
      }

      public static Version of(final String code, final String desc) {
         return new Version(code, desc);
      }
   }
}
