package com.qmth.jkserver.model;

//import com.fasterxml.jackson.annotation.JsonFormat;
//import io.swagger.annotations.ApiModelProperty;
//import org.springframework.data.annotation.Id;
//import org.springframework.data.mongodb.core.index.Indexed;
//import org.springframework.data.mongodb.core.mapping.Document;
//import org.springframework.data.mongodb.core.mapping.Field;
//
//import java.io.Serializable;
//import java.util.Date;
//
///**
// * @Description: 数据中心第三方机构
// * @Param:
// * @return:
// * @Author: wangliang
// * @Date: 2021/10/20
// */
//@Document(collection = "jk_exam_third_org")
//public class ExamThirdOrg implements Serializable {
//
//    private static final long serialVersionUID = -6624764888197088459L;
//
//    @ApiModelProperty(value = "主键")
//    @Id
//    private String id;
//
//    @ApiModelProperty(value = "机构名称")
//    @Field("name")
//    private String name;
//
//    @ApiModelProperty(value = "机构编码")
//    @Indexed(unique = true)
//    @Field("code")
//    private String code;
//
//    @ApiModelProperty(value = "开始时间")
//    @Field("start_time")
//    @JsonFormat(pattern = "yyyy-MM-dd")
//    private Date startTime;
//
//    @ApiModelProperty(value = "结束时间")
//    @Field("end_time")
//    @JsonFormat(pattern = "yyyy-MM-dd")
//    private Date endTime;
//
//    @ApiModelProperty(value = "是否启用，true：启用，false：禁用")
//    @Field("enable")
//    private boolean enable;
//
//    @ApiModelProperty(value = "访问key")
//    @Field("access_key")
//    private String accessKey;
//
//    @ApiModelProperty(value = "访问密钥")
//    @Field("access_secret")
//    private String accessSecret;
//
//    public ExamThirdOrg() {
//
//    }
//
//    public ExamThirdOrg(String name, String code, String accessKey, String accessSecret) {
//        this.name = name;
//        this.code = code;
//        this.startTime = new Date();
//        this.enable = true;
//        this.accessKey = accessKey;
//        this.accessSecret = accessSecret;
//    }
//
//    public ExamThirdOrg(String name, String code, String accessKey, String accessSecret, Date endTime) {
//        this.name = name;
//        this.code = code;
//        this.startTime = new Date();
//        this.enable = true;
//        this.accessKey = accessKey;
//        this.accessSecret = accessSecret;
//        this.endTime = endTime;
//    }
//
//    public static long getSerialVersionUID() {
//        return serialVersionUID;
//    }
//
//    public String getId() {
//        return id;
//    }
//
//    public void setId(String id) {
//        this.id = id;
//    }
//
//    public String getName() {
//        return name;
//    }
//
//    public void setName(String name) {
//        this.name = name;
//    }
//
//    public String getCode() {
//        return code;
//    }
//
//    public void setCode(String code) {
//        this.code = code;
//    }
//
//    public Date getStartTime() {
//        return startTime;
//    }
//
//    public void setStartTime(Date startTime) {
//        this.startTime = startTime;
//    }
//
//    public Date getEndTime() {
//        return endTime;
//    }
//
//    public void setEndTime(Date endTime) {
//        this.endTime = endTime;
//    }
//
//    public boolean isEnable() {
//        return enable;
//    }
//
//    public void setEnable(boolean enable) {
//        this.enable = enable;
//    }
//
//    public String getAccessKey() {
//        return accessKey;
//    }
//
//    public void setAccessKey(String accessKey) {
//        this.accessKey = accessKey;
//    }
//
//    public String getAccessSecret() {
//        return accessSecret;
//    }
//
//    public void setAccessSecret(String accessSecret) {
//        this.accessSecret = accessSecret;
//    }
//}

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.jkserver.constant.SystemConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 数据中心第三方机构
 * </p>
 *
 * @author wangliang
 * @since 2023-03-01
 */
@ApiModel(value = "JkExamThirdOrg对象", description = "数据中心第三方机构")
@TableName("jk_exam_third_org")
public class ExamThirdOrg implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "机构名称")
    private String name;

    @ApiModelProperty(value = "机构编码")
    private String code;

    @ApiModelProperty(value = "开始时间")
    private Long startTime;

    @ApiModelProperty(value = "结束时间")
    private Long endTime;

    @ApiModelProperty(value = "是否启用，1：启用，0：禁用")
    private Boolean enable;

    @ApiModelProperty(value = "外部访问凭证")
    private String accessKey;

    @ApiModelProperty(value = "外部访问密钥")
    private String accessSecret;

    public ExamThirdOrg() {

    }

    public ExamThirdOrg(String name, String code, String accessKey, String accessSecret) {
        this.id = SystemConstant.getDbUuid();
        this.name = name;
        this.code = code;
        this.startTime = System.currentTimeMillis();
        this.enable = true;
        this.accessKey = accessKey;
        this.accessSecret = accessSecret;
    }

    public ExamThirdOrg(String name, String code, String accessKey, String accessSecret, Long endTime) {
        this.id = SystemConstant.getDbUuid();
        this.name = name;
        this.code = code;
        this.startTime = System.currentTimeMillis();
        this.enable = true;
        this.accessKey = accessKey;
        this.accessSecret = accessSecret;
        this.endTime = endTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getAccessSecret() {
        return accessSecret;
    }

    public void setAccessSecret(String accessSecret) {
        this.accessSecret = accessSecret;
    }
}