package com.dtok.entity;

import javax.persistence.*;
import java.io.Serializable;

import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Description
 * @Author C.J
 * @Date 2024-03-09
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "login_history")
public class LoginHistory implements Serializable {

    private static final long serialVersionUID = 7745461238091119313L;

    public static final String PC = "PC";
    public static final String DEVICE = "DEVICE";

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @Column(name = "user")
    private Long user;

    @Column(name = "ip")
    private String ip;

    @Column(name = "happen_time")
    private Date happenTime;

    /**
     * 发生动作1. 登录 0. 退出
     */
    @Column(name = "action_type")
    private Integer actionType;

    @Column(name = "username")
    private String username;

    @Column(name = "login_sys")
    private String loginSys;

}
