package com.zhongshu.card.server.core.domain.org;

import com.github.microservice.components.data.mongo.mongo.domain.SuperEntity;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 用户登录日志
 */
@Data
@Document
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class UserLoginRecord extends SuperMain {

    @Indexed
    private String uid;

    @Indexed
    private String phone;

    /**
     * 账户名称
     */
    private String userName;

    /**
     * 过期时间
     */
    @Indexed(expireAfterSeconds = 0)
    private Date TTL;
}
