package com.railway.business.app.domain;

import com.railway.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

/**
 * apk更新任务
 *
 * @author zhaomn 2021-12-13
 */
@Data
@ApiModel("apk更新任务")
@EqualsAndHashCode(callSuper = true)
public class AppTask extends BaseEntity {

  @ApiModelProperty(value = "主键", hidden = true)
  private String id;

  @ApiModelProperty(value = "apk记录id")
  private Long apkId;

  @ApiModelProperty(value = "apk版本")
  @Length(min = 1, max = 64, message = "【apk版本】长度必须介于 {min} 和 {max} 之间")
  private String apkVersion;

  @ApiModelProperty(value = "更新类型 0全部，1指定用户， 2指定部门")
  @Length(min = 1, max = 2, message = "【更新类型 0全部，1指定用户， 2指定部门】长度必须介于 {min} 和 {max} 之间")
  private String taskType;

  @ApiModelProperty(value = "更新类型指定用户时有值")
  private Long userId;

  @ApiModelProperty(value = "更新类型指定用户或部门时有值")
  private Long deptId;

  @ApiModelProperty(value = "任务生效日期")
  private Date enableDate;

  @ApiModelProperty(value = "del_flag")
  @Length(min = 1, max = 1, message = "【del_flag】长度必须介于 {min} 和 {max} 之间")
  private String delFlag;

}