package cn.iocoder.yudao.module.system.controller.admin.reservation.vo.excel;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.module.system.convert.excel.LocalDateTimeConvert;
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;

@Schema(description = "管理后台 - 长者来访预约 Response VO")
@Data
@ExcelIgnoreUnannotated
public class AppointmentExportExcelVO {


    @Schema(description = "预约目的")
    @ExcelProperty("预约目的")
    @DictFormat(DictTypeConstants.PURPOSE_OF_APPOINTMENT)
    private Integer appointmentPurpose;

    @Schema(description = "预约形式")
    @ExcelProperty("预约形式")
    @DictFormat(DictTypeConstants.RESERVATION_FORM)
    private Integer appointmentForm;


    @Schema(description = "预约人姓名")
    @ExcelProperty("预约人姓名")
    private String appointedBy;

    @Schema(description = "预约人性别")
    @ExcelProperty("预约人性别")
    @DictFormat(DictTypeConstants.USER_SEX)
    private Integer gender;

    @Schema(description = "预约人联系方式")
    @ExcelProperty("预约人联系方式")
    private String phone;


    @Schema(description = "预约日期")
    @ExcelProperty(value = "预约日期",converter = LocalDateTimeConvert.class)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY, timezone = TIME_ZONE_DEFAULT)
    private LocalDateTime appointmentDate;

    @Schema(description = "状态,0：待接待 1：已接待 2：已关闭", example = "1")
    @ExcelProperty("预约状态")
    @DictFormat(DictTypeConstants.APPOINTMENT_STATUS2)
    private Integer status;

    @Schema(description = "销售人员")
    @ExcelProperty("销售人员")
    private String salesperson;

    @Schema(description = "预约说明")
    @ExcelProperty("预约说明")
    private String appointmentInstructions;



}