package com.red.circle.other.app.dto.cmd.material;

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.other.inner.enums.material.PropsCommodityType;
import com.red.circle.other.inner.enums.material.PropsCurrencyType;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 道具列表获取.
 *
 * @author pengliang on 2021/1/22
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class PropsStoreTypeQryCmd extends AppExtCommand {

  /**
   * 货币类型.
   *
   * @eo.required
   */
  @NotNull(message = "currencyType required.")
  private PropsCurrencyType currencyType;

  /**
   * 道具类型(AVATAR_FRAME:头像、FLOAT_PICTURE:个人飘窗、DATA_CARD:数据卡片、CHAT_BUBBLE:聊天气泡、RIDE:座驾、LAYOUT:主题装扮、THEME:主题背景).
   *
   * @eo.required
   */
  @NotNull(message = "propsType required.")
  private PropsCommodityType propsType;

  /**
   * 缓存key.
   */
  public String controllerCacheKey() {
    // 如：ASWAT_AVATAR_FRAME_GOLD
    return requireReqSysOrigin() + "_" + propsType + "_" + currencyType;
  }

}
