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

import com.red.circle.common.business.dto.cmd.AppExtCommand;
import com.red.circle.tool.core.num.ArithmeticUtils;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 创建ludo.
 *
 * @author pengliang on 2021/7/27
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class GameLudoCreateCmd extends AppExtCommand {

  /**
   * 房间id.
   *
   * @eo.required
   */
  @NotNull(message = "roomId required.")
  private Long roomId;

  /**
   * 金额.
   *
   * @eo.required
   */
  @NotNull(message = "amount required.")
  private BigDecimal amount;

  /**
   * 锁位置.
   *
   * @eo.required
   */
  @NotNull(message = "localSeat required.")
  private String localSeat;

  /**
   * 游戏ID
   */
  private Long gameId;

  /**
   * 房主id.
   *
   * @eo.required
   */
  @NotNull(message = "homeownerUserId required.")
  private Long homeownerUserId;

  public boolean isConsumeAmount() {
    return ArithmeticUtils.gtZero(amount);
  }

}
