package com.yuchen.saas.park.service.mapper.domain.task;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yuchen.saas.park.api.config.LongToStringSerializer;
import lombok.Data;

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

@Nullable
@Data
public class DoorAccessControlConfigIssueTaskRO {
    /**
     * 用户
     */
    @JsonSerialize(using = LongToStringSerializer.class)
    private long userId;
    /**
     * 用户名称
     */
    private String realName;

    /**
     * 门禁
     */
    @JsonSerialize(using = LongToStringSerializer.class)
    private long doorAccessControlId;
    private String doorAccessControlName;
    private String doorAccessControlAddress;
    private String doorAccessControlParkName;

    private int type;

    // 明细
    @JsonSerialize(using = LongToStringSerializer.class)
    @Positive
    private long id;

    @Nullable
    private LocalDateTime processingStartTime;
    @Nullable
    private LocalDateTime processingEndTime;
    private boolean isSuccessful;
    @Nullable
    private String processingFailureReason;
}
