package com.ruixuan.launch.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruixuan.common.annotation.Excel;
import lombok.Data;

import java.util.Date;

/**
 * 对象 agent_token
 *
 * @author ruoyi
 * @date 2022-07-15
 */
@Data
public class AccountToken {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private String id;

    /**
     * 媒体ID（外部广告平台类型，快手/头条/抖音等）
     */
    @Excel(name = "媒体ID", readConverterExp = "外=部广告平台类型，快手/头条/抖音等")
    private String mediaId;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long agentId;

    /**
     * 访问令牌
     */
    @Excel(name = "访问令牌")
    private String accessToken;

    /**
     * 访问令牌有效期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "访问令牌有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date accessTokenExpiresIn;

    /**
     * 刷新令牌
     */
    @Excel(name = "刷新令牌")
    private String refreshToken;

    /**
     * 刷新令牌有效期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "刷新令牌有效期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date refreshTokenExpiresIn;

    /**
     * 代理商类型 0：三方代理商 1：本代理商
     */
    @Excel(name = "代理商类型 0：三方代理商 1：本代理商")
    private Integer agentType;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long appId;

    /**
     * $column.columnComment
     */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String secret;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}