package com.red.circle.order.app.dto.cmd;

import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author pengliang on 2019/12/19 18:52
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class ApplePurchaseCmd extends AbstractPurchaseCmd {

  /**
   * 收据 base64
   */
  @NotBlank(message = "receipt required.")
  private String receipt;

  /**
   * iOS=苹果内购交易ID,Android=产品数据
   */
  @NotBlank(message = "transaction required.")
  private String transaction;

  @Override
  public String extractStrategyName() {
    return "appleExtractAppPurchaseOrderStrategy";
  }

}
