package com.hzya.frame.sys.thirdparty.api.test.entity;

import java.util.Date;

import cn.dev33.satoken.stp.StpUtil;
import com.hzya.frame.sys.thirdparty.api.testparameter.entity.SysThirdpartyapiTestparameter;
import com.hzya.frame.uuid.UUIDUtils;
import com.hzya.frame.web.entity.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.List;

/**
 * @description: 第三方应用接口测试表
 * @tableName: sys_thirdparty_api_test
 * @entityName: SysThirdpartyapiTest
 * @author: llg
 * @history: 1.0
 */
public class SysThirdpartyapiTest extends BaseEntity {

    /**
     * 唯一标识码
     */
    private String id;
    /**
     * 接口id
     */
    private String thirdpartyApiId;
    /**
     * 应用系统
     */
    private String productName;
    /**
     * 用例名称
     */
    private String useCaseName;
    /**
     * 排序号
     */
    private Long sorts;
    /**
     * 创建人id
     */
    private String orgId;
    /**
     * 状态(Y正常N删除)
     */
    private String sts;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 创建人id
     */
    private String createUserId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
    /**
     * 修改人id
     */
    private String modifyUserId;
    private String sort;
    private String order;
    private List<SysThirdpartyapiTestparameter> sysThirdpartyapiTestparameterList;
    //headers参数
    private List<SysThirdpartyapiTestparameter> headers;
    //body参数
    private List<SysThirdpartyapiTestparameter> bodys;


    /**
     * 接口id
     */
    public void setThirdpartyApiId(String thirdpartyApiId) {
        this.thirdpartyApiId = thirdpartyApiId;
    }

    /**
     * 接口id
     */
    public String getThirdpartyApiId() {
        return thirdpartyApiId;
    }

    /**
     * 应用系统
     */
    public void setProductName(String productName) {
        this.productName = productName;
    }

    /**
     * 应用系统
     */
    public String getProductName() {
        return productName;
    }

    /**
     * 用例名称
     */
    public void setUseCaseName(String useCaseName) {
        this.useCaseName = useCaseName;
    }

    /**
     * 用例名称
     */
    public String getUseCaseName() {
        return useCaseName;
    }

    /**
     * 排序号
     */
    public void setSorts(Long sorts) {
        this.sorts = sorts;
    }

    /**
     * 排序号
     */
    public Long getSorts() {
        return sorts;
    }

    /**
     * 创建人id
     */
    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    /**
     * 创建人id
     */
    public String getOrgId() {
        return orgId;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建人id
     */
    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * 创建人id
     */
    public String getCreateUserId() {
        return createUserId;
    }

    /**
     * 修改时间
     */
    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    /**
     * 修改时间
     */
    public Date getModifyTime() {
        return modifyTime;
    }

    /**
     * 修改人id
     */
    public void setModifyUserId(String modifyUserId) {
        this.modifyUserId = modifyUserId;
    }

    /**
     * 修改人id
     */
    public String getModifyUserId() {
        return modifyUserId;
    }

    public List<SysThirdpartyapiTestparameter> getSysThirdpartyapiTestparameterList() {
        return sysThirdpartyapiTestparameterList;
    }

    public void setSysThirdpartyapiTestparameterList(List<SysThirdpartyapiTestparameter> sysThirdpartyapiTestparameterList) {
        this.sysThirdpartyapiTestparameterList = sysThirdpartyapiTestparameterList;
    }

    public List<SysThirdpartyapiTestparameter> getHeaders() {
        return headers;
    }

    public void setHeaders(List<SysThirdpartyapiTestparameter> headers) {
        this.headers = headers;
    }

    public List<SysThirdpartyapiTestparameter> getBodys() {
        return bodys;
    }

    public void setBodys(List<SysThirdpartyapiTestparameter> bodys) {
        this.bodys = bodys;
    }

    //创建信息
    public void setCreate() {
        this.id = UUIDUtils.getUUID();
        this.orgId = "";
        this.sts = "Y";
        this.createUserId = String.valueOf(StpUtil.getLoginId());
        this.createTime = new Date();
        this.modifyTime = new Date();
        this.modifyUserId = String.valueOf(StpUtil.getLoginId());
    }


    //修改信息
    public void setUpdate() {
        this.modifyTime = new Date();
        this.modifyUserId = String.valueOf(StpUtil.getLoginId());
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String getSts() {
        return sts;
    }

    @Override
    public void setSts(String sts) {
        this.sts = sts;
    }

    @Override
    public String getSort() {
        return sort;
    }

    @Override
    public void setSort(String sort) {
        this.sort = sort;
    }

    @Override
    public String getOrder() {
        return order;
    }

    @Override
    public void setOrder(String order) {
        this.order = order;
    }
}
