package com.xinelu.manage.domain.orderevaluateinfo;

import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
import com.xinelu.common.custominterface.Insert;
import com.xinelu.common.custominterface.Update;
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;

/**
 * 预约服务订单和商品订单评价信息对象 order_evaluate_info
 *
 * @author xinyilu
 * @date 2022-11-17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "预约服务订单和商品订单评价信息对象", description = "order_evaluate_info")
public class OrderEvaluateInfo extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -4639358409028289080L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 会员id
     */
    @ApiModelProperty(value = "会员id")
    @Excel(name = "会员id")
    @NotNull(message = "请选择会员信息", groups = {Insert.class})
    private Long patientId;

    /**
     * 微信openid
     */
    @ApiModelProperty(value = "微信openid")
    @Excel(name = "微信openid")
    private String openid;

    /**
     * 微信unionid
     */
    @ApiModelProperty(value = "微信unionid")
    @Excel(name = "微信unionid")
    private String unionid;

    /**
     * 订单编号
     */
    @ApiModelProperty(value = "订单编号")
    @Excel(name = "订单编号")
    @NotBlank(message = "请选择订单编号", groups = {Insert.class})
    private String orderNo;

    /**
     * 评价内容
     */
    @ApiModelProperty(value = "评价内容")
    @Excel(name = "评价内容")
    private String evaluateContent;

    /**
     * 手机App：PHONE_APP，微信小程序：WE_CHAT_APPLET
     */
    @ApiModelProperty(value = "手机App：PHONE_APP，微信小程序：WE_CHAT_APPLET")
    @Excel(name = "手机App：PHONE_APP，微信小程序：WE_CHAT_APPLET")
    @NotBlank(message = "请选择支付渠道", groups = {Insert.class})
    private String evaluateChannel;

    /**
     * 预约服务满意度，一般：COMMONLY，满意：SATISFIED，不满意：DISSATISFIED
     */
    @ApiModelProperty(value = "预约服务满意度，一般：COMMONLY，满意：SATISFIED，不满意：DISSATISFIED")
    @Excel(name = "预约服务满意度，一般：COMMONLY，满意：SATISFIED，不满意：DISSATISFIED")
    @NotBlank(message = "请选择服务满意度", groups = {Insert.class})
    private String evaluateSatisfaction;

    /**
     * 商品订单综合评分，取值，1：代表1颗星，2：代表两颗星，3：代表三颗星，4：代表四颗星，5：代表五颗星
     */
    @ApiModelProperty(value = "商品订单综合评分，取值，1：代表1颗星，2：代表两颗星，3：代表三颗星，4：代表四颗星，5：代表五颗星")
    @Excel(name = "商品订单综合评分，取值，1：代表1颗星，2：代表两颗星，3：代表三颗星，4：代表四颗星，5：代表五颗星")
    @NotNull(message = "请选择评分", groups = {Update.class})
    private Integer compositeScore;

    /**
     * 订单来源，泉医模块：SPRING_DOCTOR，家医模块：FAMILY_DOCTOR
     */
    @ApiModelProperty(value = "订单来源，泉医模块：SPRING_DOCTOR，家医模块：FAMILY_DOCTOR")
    @Excel(name = "订单来源，泉医模块：SPRING_DOCTOR，家医模块：FAMILY_DOCTOR")
    private String orderSource;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("patientId", getPatientId())
                .append("openid", getOpenid())
                .append("unionid", getUnionid())
                .append("orderNo", getOrderNo())
                .append("evaluateContent", getEvaluateContent())
                .append("evaluateChannel", getEvaluateChannel())
                .append("evaluateSatisfaction", getEvaluateSatisfaction())
                .append("compositeScore", getCompositeScore())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
