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 org.hibernate.annotations.GenericGenerator;

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

/**
 * @author baoxy
 * @date 2023-06-09
 */
@Entity
@Table(name = "ycq_app_config_url")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = { "appId" })
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "APP端配置URL表")
public class YcqAppConfigUrl implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "idGenerator")
    @Column(name = "app_id")
    @ApiModelProperty(value = "app的主键id")
    private Long appId;

    @Column(name = "app_code")
    @ApiModelProperty(value = "app的唯一编码")
    private String appCode;

    @Column(name = "app_url")
    @ApiModelProperty(value = "app跳转URL")
    private String appUrl;

    @Column(name = "app_name")
    @ApiModelProperty(value = "app名称")
    private String appName;

    @Column(name = "sort")
    @ApiModelProperty(value = "顺序")
    private Integer sort;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Column(name = "state")
    @ApiModelProperty(value = "状态 1:有效 0:无效")
    private Integer state;

    // 2023-7-4 由shenhs添加
    @Column(name = "logo_url")
    @ApiModelProperty(value = "图标的URL")
    private String logoUrl;

    // 2023-7-4 由shenhs添加
    @Column(name = "must_auth")
    @ApiModelProperty(value = "是否必须进行认证 1:必须认证 0:不需要认证")
    private Integer mustAuth;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @Column(name = "system_name")
    @ApiModelProperty(value = "系统名称")
    private String systemName;

    @Column(name = "sponsor")
    @ApiModelProperty(value = "主管单位")
    private Long sponsor;

    @Column(name = "public_key")
    @ApiModelProperty(value = "公钥")
    private String publicKey;

    @Column(name = "private_key")
    @ApiModelProperty(value = "私钥")
    private String privateKey;

    @Column(name = "must_hex")
    @ApiModelProperty(value = "是否为16进制 1:是 0:否")
    private Integer mustHex;

    @Column(name = "notes")
    @ApiModelProperty(value = "备注")
    private String notes;

    @Column(name = "must_external")
    @ApiModelProperty(value = "是否为外部地址(带http和https的为外部地址) 1:是 0:否")
    private Integer mustExternal;

    @Column(name = "update_worker")
    @ApiModelProperty(value = "更新人id")
    private Integer updateWorker;

    @Column(name = "app_type")
    @ApiModelProperty(value = "应用类别(1.自有应用、2.外部应用)")
    private Integer appType;

    @Column(name = "is_clear_local_storage")
    @ApiModelProperty(value = "是否清除浏览器缓存(1是,0否)")
    private Integer isClearLocalStorage;

    @Column(name = "subject")
    @ApiModelProperty(value = "所属专题")
    private String subject;


    @Column(name = "type")
    @ApiModelProperty(value = "状态")
    private Integer type;

    @Column(name = "is_check_login")
    @ApiModelProperty(value = "1 是 0 否 ")
    private Integer isCheckLogin;

}
