package com.yuchen.saas.park.api.entity.door.card;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yuchen.saas.park.api.commons.entity.SimpleEntity;
import lombok.Data;

import javax.annotation.Nullable;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Positive;
import java.time.LocalDateTime;

/**
 * 门禁卡
 */
@TableName
@Data
public class DoorAccessControlCard extends SimpleEntity {
    @Positive
    private long userId;

    @NotBlank
    private String no;

    @NotBlank
    private String password;

    /**
     * 挂失
     */
    @TableField("is_loss_report")
    private boolean lossReport;
    @Nullable
    private LocalDateTime lossReportTime;
    @Nullable
    private LocalDateTime cancelLossReportTime;
}
