package com.bonus.canteen.core.customer.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;
      }

      public boolean equals(final Object o) {
         if (o == this) {
            return true;
         } else if (!(o instanceof Version)) {
            return false;
         } else {
            Version other = (Version)o;
            if (!other.canEqual(this)) {
               return false;
            } else {
               Object this$code = this.getCode();
               Object other$code = other.getCode();
               if (this$code == null) {
                  if (other$code != null) {
                     return false;
                  }
               } else if (!this$code.equals(other$code)) {
                  return false;
               }

               Object this$desc = this.getDesc();
               Object other$desc = other.getDesc();
               if (this$desc == null) {
                  if (other$desc != null) {
                     return false;
                  }
               } else if (!this$desc.equals(other$desc)) {
                  return false;
               }

               return true;
            }
         }
      }

      protected boolean canEqual(final Object other) {
         return other instanceof Version;
      }


      public String toString() {
         String var10000 = this.getCode();
         return "CustomBusiness.Version(code=" + var10000 + ", desc=" + this.getDesc() + ")";
      }

      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);
      }
   }
}
