package com.crunii.micro.domain.entity.main;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.util.Date;


@Entity
@Table(name = "YCQ_APP_VERSION")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = {"id"})
@ApiModel(description = "职务与角色关联表")
public class YcqAppVersion {

    /**
     *
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "主键id")
    private Long id;
    /**
     * 创建人
     */
    @ApiModelProperty(name = "创建人", notes = "")
    @Column(name = "created_by")
    private String createdBy;
    /**
     * 创建时间
     */
    @ApiModelProperty(name = "创建时间", notes = "")
    @Column(name = "created_time")
    private Date createdTime;
    /**
     * 版本名字
     */
    @ApiModelProperty(name = "版本名字", notes = "")
    @Column(name = "VERSION_NAME")
    private String versionName;

    /**
     * 版本号
     */
    @ApiModelProperty(name = "版本号", notes = "")
    @Column(name = "version")
    private String version;
    /**
     * 上线内容
     */
    @ApiModelProperty(name = "上线内容", notes = "")
    @Column(name = "content")
    private String content;
    /**
     * app包上传地址
     */
    @ApiModelProperty(name = "app包上传地址", notes = "")
    @Column(name = "file_url")
    private String fileUrl;


    /**
     * 更新类型 1 是 0 否
     */
    @ApiModelProperty(name = "是否强制更新 1 是 0 否", notes = "")
    @Column(name = "updates_type")
    private Integer updatesType;

    /**
     * 发布时间
     */
    @ApiModelProperty(name = "发布时间", notes = "")
    @Column(name = "publish_time")
    private Date publishTime;

    /**
     * 最低版本
     */
    @ApiModelProperty(name = "最低版本", notes = "")
    @Column(name = "minimum_version")
    private String minimumVersion;


    /**
     * 最低版本
     */
    @ApiModelProperty(name = "是否有效 1是 0否", notes = "")
    @Column(name = "is_available")
    private Integer isAvailable=1;


    /**
     * 客户端类型 1安卓
     */
    @ApiModelProperty(name = "客户端类型 1安卓", notes = "")
    @Column(name = "client_type")
    private Integer clientType;

    /**
     * 发布类型
     */
    @ApiModelProperty(name = "发布类型", notes = "")
    @Column(name = "publication_type")
    private Integer publicationType;
}
