package com.fs.survey.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 问卷访问日志对象 survey_access_log
 *
 */
@Data
public class SurveyAccessLog extends BaseEntity {
    private static final long serialVersionUID = 1L;

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

    /** 租户ID */
    @Excel(name = "租户ID")
    private Long companyId;

    /** 问卷ID */
    @Excel(name = "问卷ID")
    private Long questionnaireId;

    /** 版本ID */
    @Excel(name = "版本ID")
    private Long versionId;

    /** 访问类型：1浏览 2提交 */
    @Excel(name = "访问类型", readConverterExp = "1=浏览,2=提交")
    private Integer accessType;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 用户名 */
    @Excel(name = "用户名")
    private String userName;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipAddress;

    /** 浏览器UA */
    @Excel(name = "浏览器UA")
    private String userAgent;

    /** 访问时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date accessTime;

}
