package com.chushang.system.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chushang.common.mybatis.annotation.Condition;
import com.chushang.common.mybatis.base.BaseEntity;
import com.chushang.system.entity.enums.LoginStatusEnum;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * by zhaowenyuan create 2022/5/19 18:18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_login_info")
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class SysLoginInfo extends BaseEntity {

    @TableId(value = "info_id", type = IdType.ASSIGN_ID)
    @Condition(name = "info_id", type = Condition.ConditionType.eq)
    private Long infoId;

    @TableField(value = "username")
    @Condition(name = "username", type = Condition.ConditionType.like)
    private String username;

    @TableField(value = "status")
    @Condition(name = "status", type = Condition.ConditionType.eq)
    private LoginStatusEnum status;

    @TableField(value = "ipaddr")
    @Condition(name = "ipaddr", type = Condition.ConditionType.like)
    private String ipaddr;

    @TableField(value = "msg")
    private String msg;

    @TableField(value = "access_time")
    private LocalDateTime accessTime;

}
