/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved.
 * <a>http://www.crunii.com</a>
 */
package com.crunii.micro.domain.entity.main;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/**
 * @author shenhs create 2023/7/15 15:19
 */
@Entity
@Table(name = "tsm_page_visit_log")
@NamedQuery(name = "TsmPageVisitLog.findAll", query = "SELECT t FROM TsmPageVisitLog t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
@EqualsAndHashCode(of = { "id" })
@GenericGenerator(name = "idGenerator", strategy = "com.crunii.micro.core.distributed.DistributedSnowFlakeId")
@ApiModel(description = "用户访问记录表")
public class TsmPageVisitLog {

	@Id
	@GeneratedValue(generator = "idGenerator")
	@Column(name = "id")
	@ApiModelProperty(value = "主键")
	private Long id;

	@Column(name = "mobile")
	@ApiModelProperty("手机号")
	private String mobile;

	@Column(name = "page_id")
	@ApiModelProperty("页面ID")
	private String pageId;

	@Column(name = "page_url")
	@ApiModelProperty("页面链接")
	private String pageUrl;

	@Column(name = "create_time")
	@ApiModelProperty("访问时间")
	private Date createTime;

	@Column(name = "visit_type")
	@ApiModelProperty("访问类型：1、内部地址 2、外部地址")
	private Integer visitType;

	@Column(name = "scope")
	@ApiModelProperty("登录平台：WEB、APP、SSO")
	private String scope;

	@Column(name = "user_agent")
	@ApiModelProperty("userAgent")
	private String userAgent;

}
