package com.red.circle.other.app.dto.cmd.user.relation.friendcard;

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

/**
 * 友谊关系卡 发送申请.
 *
 * @author pengshigang on 2022/6/9
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class FriendshipCardApplyCmd extends AppExtCommand {

  /**
   * 接受申请用户.
   */
  @NotNull(message = "acceptApplyUserId required.")
  private Long acceptApplyUserId;

  /**
   * 申请文案.
   */
  @Length(min = 1, max = 100, message = "applyText range 1~100.")
  @NotBlank(message = "applyText {not.null}")
  private String applyText;

  /**
   * 卡片类型.
   */
  @NotBlank(message = "type required.")
  private String type;

  public String getAcceptApplyUserIdString() {
    return getAcceptApplyUserId().toString();
  }

  public String getSendApplyUserIdString() {
    return requiredReqUserIdStr();
  }
}
