package cn.com.ctop.common.module.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 代理商token
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2020-08-18
 */
@Data
@TableName("ctop_oauth_agent_token")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ctop_oauth_agent_token对象", description = "代理商token")
public class OauthAgentToken {

    /**
     * 主键ID
     */
    @TableId(type = IdType.UUID)
    @ApiModelProperty(value = "主键ID")
    private String id;
    /**
     * 媒体ID（外部广告平台类型，快手/头条/抖音等）
     */
    @Excel(name = "媒体ID（外部广告平台类型，快手/头条/抖音等）", width = 15)
    @ApiModelProperty(value = "媒体ID（外部广告平台类型，快手/头条/抖音等）")
    private String mediaId;

    private Long agentId;
    /**
     * 访问令牌
     */
    @Excel(name = "访问令牌", width = 15)
    @ApiModelProperty(value = "访问令牌")
    private String accessToken;
    /**
     * 访问令牌有效期
     */
    @Excel(name = "访问令牌有效期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "访问令牌有效期")
    private Date accessTokenExpiresIn;
    /**
     * 刷新令牌
     */
    @Excel(name = "刷新令牌", width = 15)
    @ApiModelProperty(value = "刷新令牌")
    private String refreshToken;
    /**
     * 刷新令牌有效期
     */
    @Excel(name = "刷新令牌有效期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "刷新令牌有效期")
    private Date refreshTokenExpiresIn;
    /**
     * 代理商类型 0：三方代理商 1：本代理商
     */
    @Excel(name = "代理商类型 0：三方代理商 1：本代理商", width = 15)
    @ApiModelProperty(value = "代理商类型 0：三方代理商 1：本代理商")
    private Integer agentType;
    /**
     * 创建时间
     */
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    /**
     * 修改时间
     */
    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;
}
