package org.dromara.app.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.app.domain.AppVersion;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

/**
 * APP版本业务对象 app_version
 *
 * @author Lion Li
 * @date 2026-07-01
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = AppVersion.class, reverseConvertGenerate = false)
public class AppVersionBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 平台 android/ios
     */
    @NotBlank(message = "平台 android/ios不能为空", groups = { AddGroup.class, EditGroup.class })
    private String platform;

    /**
     * 最新版本号
     */
    @NotBlank(message = "最新版本号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String latestVersion;

    /**
     * 版本序号，用于排序取最新版本
     */
    @NotNull(message = "版本序号，用于排序取最新版本不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long versionCode;

    /**
     * 是否强制更新 0否 1是
     */
    @NotBlank(message = "是否强制更新 0否 1是不能为空", groups = { AddGroup.class, EditGroup.class })
    private String forceUpdate;

    /**
     * 下载地址
     */
    private String downloadUrl;

    /**
     * 更新说明
     */
    private String releaseNotes;

    /**
     * 状态 0停用 1启用
     */
    @NotBlank(message = "状态 0停用 1启用不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    private String remark;


}
