package com.chushang.inspection.project.vo;

import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.chushang.common.dict.annotation.DictFormat;
import com.chushang.inspection.terminal.vo.StoreVO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TerminalApp implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long terminalId;

    /**
     * id
     */
    private Long storeId;

    /**
     * id
     */
    private Long lowerTaskId;

    /**
     * 终端sn号
     */
    private String terminalSn;

    /**
     * 终端编号
     */
    private String terminalNo;

    /**
     * 终端类型
     */
    @DictFormat(dictType = "terminal_type")
    private Integer terminalType;

    /**
     * 终端型号
     */
    private String terminalModel;

    /**
     * 终端版本号
     */
    private String terminalVersion;

    /**
     * 终端地址
     */
    private String terminalAddress;

    /**
     * 终端来源
     */
    @DictFormat(dictType = "terminal_source")
    private Integer terminalSource;

    /**
     * 机构名称
     * taskId
     */
    private String taskName;

    /**
     * 商户信息
     * storeId
     */
    private StoreVO store;
    /**
     * 上次工单处理时间
     * wrk_info_ id
     * (state = :state) order by dispose_time desc limit 1
     */
    @DateTimeFormat(DatePattern.NORM_DATETIME_MS_PATTERN)
    private LocalDateTime processingTime;

    /**
     * 上次服务结果
     * wrk_info id
     * (state = :state) order by dispose_time desc limit 1
     */
    @DictFormat(dictType = "service_results")
    private Integer serviceResults;
}
