package com.ruoyi.interfaces.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName
public class PtService implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "SRV_ID", type = IdType.ASSIGN_UUID)
    @ApiModelProperty("srvId")
    private String srvId;

    @ApiModelProperty("模型id")
    private String mdid;
    @ApiModelProperty("目录ID")
    private String cateCode;
    @ApiModelProperty("服务名称")
    private String name;
    @ApiModelProperty("服务详情")
    private String intro;
    @ApiModelProperty("服务来源")
    private String serviceSource;
    @ApiModelProperty("服务所属业务部门")
    private String serviceDept;
    @ApiModelProperty("业务部门管理人")
    private String manageName;
    @ApiModelProperty("服务开发单位")
    private String developUnit;
    @ApiModelProperty("服务开发单位联系方式")
    private String developContacter;
    @ApiModelProperty("服务运维单位")
    private String maintainUnit;
    @ApiModelProperty("服务运维单位联系人")
    private String maintainContacer;
    @ApiModelProperty("更新周期")
    private String upCycl;
    @ApiModelProperty("开放条件")
    private String openCndtn;
    @ApiModelProperty("所属区县")
    private String adName;
    @ApiModelProperty("数据领域")
    private String dataField;
    @ApiModelProperty("数据范围")
    private String dataRange;
    @ApiModelProperty("创建人ID")
    private String userId;
    @ApiModelProperty("接口状态")
    private String status;
    @ApiModelProperty("备注")
    private String note;

    @ApiModelProperty("后台请求调用的方式")
    private String type;
    @ApiModelProperty("请求地址")
    private String url;
    @ApiModelProperty("请求方式")
    private String rqtype;
    @ApiModelProperty("返回类型")
    private String rptype;
    @ApiModelProperty("返回信息")
    private String rpcontent;
    @ApiModelProperty("代理地址")
    private String proxyAddress;
    @ApiModelProperty("代理路径")
    private String proxyPath;
    @ApiModelProperty("示例")
    private String example;

    @ApiModelProperty("申请量")
    private Integer cnt;
    @ApiModelProperty("访问量")
    private Integer viewNum;
    @ApiModelProperty("申请量")
    private Integer applyNum;
    @ApiModelProperty("数据量")
    private Integer dataNum;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("录入时间")
    private Date tm;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("更新时间")
    private Date uptm;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("发布时间")
    private Date rlstm;
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("接口发布时间")
    private Date releaseTime;
    @TableField(exist = false)
    @ApiModelProperty("收藏ID")
    private String attentionId;
    @TableField(exist = false)
    @ApiModelProperty("请求参数列表")
    private List<PtServiceParam> params;


    public PtService(String mdid) {
        this.mdid = mdid;
    }

    /**
     * 排序
     */
    private Integer sort;

    /**
     * 审核状态
     * 审核状态 0=待审核；1=已审核；2 = 驳回
     */
    private String audit;

}
