package com.red.circle.other.inner.model.cmd.pet;

import com.red.circle.other.inner.model.dto.pet.PetPoolDTO;
import com.red.circle.other.inner.model.dto.pet.PetStageDTO;
import com.red.circle.other.inner.model.dto.pet.PetUnlockConditionDTO;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author xiaofei on 2024/04/12
 */
@Data
public class PetAddCmd implements Serializable {

  private static final long serialVersionUID = 1L;

  /**
   * true：同步所以系统，false 不同步；添加时有效
   */
  private Boolean sync;

  /**
   * 宠物池信息.
   */
  @NotNull
  private PetPoolDTO petPool;

  /**
   * 宠物阶段信息.
   */
  @NotNull
  private List<PetStageDTO> petStages;

  /**
   * 解锁条件.
   */
  private List<PetUnlockConditionDTO> petUnlockConditions;

  public void setOperationUser(Long operationUser) {
    petPool.setCreateUser(operationUser);
    petPool.setUpdateUser(operationUser);
  }
}
