package com.xy.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * <p>
 * 设备门锁记录表
 * </p>
 *
 * @author lijin
 * @since 2024-07-30
 */
public class DeviceDoorRecordDto {

    @Data
    @Accessors(chain = true)
    public static class SelectList {

        @NotNull(message = "deviceId不能为空")
        @ApiModelProperty(value = "设备id", required = true)
        private Long deviceId;

        @ApiModelProperty(value = "门id")
        private Integer door;

        @ApiModelProperty(value = "状态 true=开门 false=关门")
        private Boolean status;

        @ApiModelProperty(value = "开始时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime beginTime;

        @ApiModelProperty(value = "结束时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime endTime;

    }

    @Data
    @Accessors(chain = true)
    public static class Vo {

        private Long id;

        @ApiModelProperty(value = "设备id")
        private Long deviceId;

        @ApiModelProperty(value = "门id")
        private Integer door;

        @ApiModelProperty(value = "状态 true=开门 false=关门")
        private Boolean status;

        @ApiModelProperty(value = "类型 1=交易 2=补货 3=其他")
        private Integer type;

        @ApiModelProperty(value = "创建时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime createTime;


    }

}
