package com.cpop.oam.business.vo;

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

import java.time.LocalDate;

/**
 * 工单值班返回对象
 * @author DB
 * @since 2023-11-29 13:58:05
 * @version 1.0.0
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "工单值班返回对象", description = "工单值班返回对象")
public class WorkOrderDutyVo {

    /**
     * 服务员工id
     */
    @ApiModelProperty("服务员工id")
    private String serviceStaffId;

    /**
     * 服务员工名称
     */
    @RelationOneToOne(selfField = "serviceStaffId", targetField = "id", targetTable = "cp_oam_staff", valueField = "name")
    @ApiModelProperty("服务员工名称")
    private String serviceStaffName;

    /**
     * 技术员工id
     */
    @ApiModelProperty("技术员工id")
    private String technologyStaffId;

    /**
     * 技术员工名称
     */
    @RelationOneToOne(selfField = "technologyStaffId", targetField = "id", targetTable = "cp_oam_staff", valueField = "name")
    @ApiModelProperty("技术员工名称")
    private String technologyStaffName;

    /**
     * 值班日期
     */
    @ApiModelProperty("值班日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate dutyDate;

}
