package com.xinelu.manage.domain.appointmentorderdetails;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
import com.xinelu.common.custominterface.TaskInsert;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalTime;

/**
 * 预约订单明细对象 appointment_order_details
 *
 * @author 纪寒
 * @date 2022-09-05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "预约订单明细对象", description = "appointment_order_details")
public class AppointmentOrderDetails extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -4693689972726839928L;
    /**
     * 主键id
     */
    @NotNull(message = "id不能为空！", groups = {TaskInsert.class})
    private Long id;

    /**
     * 护理站护理项目表id
     */
    @ApiModelProperty(value = "护理站护理项目表id")
    @Excel(name = "护理站护理项目表id")
    private Long nurseStationItemId;

    /**
     * 护理站护理项目价格表id
     */
    @ApiModelProperty(value = "护理站护理项目价格表id")
    @Excel(name = "护理站护理项目价格表id")
    private Long nurseStationItemPriceId;

    /**
     * 预约订单编号
     */
    @ApiModelProperty(value = "预约订单编号")
    @Excel(name = "预约订单编号")
    private String orderNo;

    /**
     * 订单数量
     */
    @ApiModelProperty(value = "订单数量")
    @Excel(name = "订单数量")
    private Long orderCount;

    /**
     * 服务地址
     */
    @ApiModelProperty(value = "服务地址")
    @Excel(name = "服务地址")
    private String serviceAddress;

    /**
     * 服务日期，格式：yyyy-MM-dd
     */
    @ApiModelProperty(value = "服务日期，格式：yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "服务日期，格式：yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDate serviceDate;

    /**
     * 服务开始时间，格式：HH:mm
     */
    @ApiModelProperty(value = "服务开始时间，格式：HH:mm:ss")
    @JsonFormat(pattern = "HH:mm")
    @Excel(name = "服务开始时间，格式：HH:mm:ss", width = 30, dateFormat = "HH:mm:ss")
    private LocalTime serviceStartTime;

    /**
     * 服务结束时间，格式：HH:mm
     */
    @ApiModelProperty(value = "服务结束时间，格式：HH:mm:ss")
    @JsonFormat(pattern = "HH:mm:ss")
    @Excel(name = "服务结束时间，格式：HH:mm:ss", width = 30, dateFormat = "HH:mm:ss")
    private LocalTime serviceEndTime;

    /**
     * 预约订单状态，代付款：WAIT_PAY，待派单：WAIT_DISPATCH，未完成：NOT_FINISH，服务完成：COMPLETE
     */
    @ApiModelProperty(value = "预约订单状态，代付款：WAIT_PAY，待派单：WAIT_DISPATCH，未完成：NOT_FINISH，服务完成：COMPLETE")
    @Excel(name = "预约订单状态，代付款：WAIT_PAY，待派单：WAIT_DISPATCH，未完成：NOT_FINISH，服务完成：COMPLETE")
    private String orderStatus;

    /**
     * 预约状态，0：可以预约，1：不可以预约
     */
    @ApiModelProperty(value = "预约状态，0：可以预约，1：不可以预约")
    @Excel(name = "预约状态，0：可以预约，1：不可以预约")
    private Integer appointmentStatus;

    /**
     * 预约总价格，单位：元
     */
    @ApiModelProperty(value = "预约总价格，单位：元")
    @Excel(name = "预约总价格，单位：元")
    private BigDecimal totalPrice;

    /**
     * 护理项目名称
     */
    @ApiModelProperty(value = "护理项目名称")
    @Excel(name = "护理项目名称")
    private String nurseItemName;

    /**
     * 护理项目价格
     */
    @ApiModelProperty(value = "护理项目价格")
    @Excel(name = "护理项目价格")
    private BigDecimal nurseItemPrice;

    /**
     * 护理项目服务时长和单位
     */
    @ApiModelProperty(value = "护理项目服务时长和单位")
    @Excel(name = "护理项目服务时长和单位")
    private String itemServeDurationUnit;

    /**
     * 耗材包总价格
     */
    @ApiModelProperty(value = "耗材包总价格")
    @Excel(name = "耗材包总价格")
    private BigDecimal consumableTotalPrice;

    /**
     * 服务到岗照片存放路径
     */
    @NotBlank(message = "服务到岗照片存放路径不能为空！", groups = {TaskInsert.class})
    private String onDutyPictureUrl;

    /**
     * 服务进行中上传视频存放路径
     */
    private String serviceProgressVideoUrl;

    /**
     * 服务结束照片存放路径
     */
    @NotBlank(message = "服务结束照片存放路径不能为空！", groups = {TaskInsert.class})
    private String serviceEndPictureUrl;

    /**
     * 用户签名确认图片存放路径
     */
    @NotBlank(message = "用户签名确认图片存放路径不能为空！", groups = {TaskInsert.class})
    private String userSignaturePictureUrl;

    /**
     * 是否删除标识，0：否，1：是
     */
    private Integer delFlag;

    /**
     * 预约服务位置纬度
     */
    private String serveLocationLatitude;

    /**
     * 预约服务位置经度
     */
    private String serveLocationLongitude;

    /**
     * 预约服务位置名称
     */
    private String serviceLocationName;

    /**
     * 失能情况，NOT_DISABLED：未失能，DISABLED：已失能
     */
    private String disablingCondition;

    /**
     * 失能原因
     */
    private String disablingReason;

    /**
     * 护理人姓名，院内陪护订单使用
     */
    private String caregiverName;

    /**
     * 护理人电话，院内陪护订单使用
     */
    private String caregiverPhone;

    /**
     * 医院名称，院内陪护订单使用
     */
    private String hospitalName;

    /**
     * 科室名称，院内陪护订单使用
     */
    private String departmentName;

    /**
     * 病床号，院内陪护订单使用
     */
    private String hospitalBedNumber;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("nurseStationItemId", getNurseStationItemId())
                .append("nurseStationItemPriceId", getNurseStationItemPriceId())
                .append("orderNo", getOrderNo())
                .append("orderCount", getOrderCount())
                .append("serviceAddress", getServiceAddress())
                .append("serviceDate", getServiceDate())
                .append("serviceStartTime", getServiceStartTime())
                .append("serviceEndTime", getServiceEndTime())
                .append("orderStatus", getOrderStatus())
                .append("appointmentStatus", getAppointmentStatus())
                .append("totalPrice", getTotalPrice())
                .append("nurseItemName", getNurseItemName())
                .append("nurseItemPrice", getNurseItemPrice())
                .append("consumableTotalPrice", getConsumableTotalPrice())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
