package com.xinelu.manage.domain.patientcouponreceive;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseDomain;
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 java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 会员用户优惠券领取记录对象 patient_coupon_receive
 *
 * @author xinyilu
 * @date 2023-02-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "会员用户优惠券领取记录对象", description = "patient_coupon_receive")
public class PatientCouponReceive extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 5822850923451694701L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 会员id
     */
    @ApiModelProperty(value = "会员id")
    @Excel(name = "会员id")
    private Long patientId;

    /**
     * 优惠券id
     */
    @ApiModelProperty(value = "优惠券id")
    @Excel(name = "优惠券id")
    private Long couponId;

    /**
     * 新人福利：NEW_PEOPLE_WELFARE，活动赠送：EVENT_GIFT，消费返券：CONSUME_REBATE
     */
    @ApiModelProperty(value = "新人福利：NEW_PEOPLE_WELFARE，活动赠送：EVENT_GIFT，消费返券：CONSUME_REBATE")
    @Excel(name = "新人福利：NEW_PEOPLE_WELFARE，活动赠送：EVENT_GIFT，消费返券：CONSUME_REBATE")
    private String receiveSource;

    /**
     * 有效期开始时间，yyyy-MM-dd HH:mm:ss
     */
    @ApiModelProperty(value = "有效期开始时间，yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "有效期开始时间，yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expirationStartTime;

    /**
     * 有效期结束时间，yyyy-MM-dd HH:mm:ss
     */
    @ApiModelProperty(value = "有效期结束时间，yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "有效期结束时间，yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expirationEndTime;

    /**
     * 领取时间，yyyy-MM-dd HH:mm:ss
     */
    @ApiModelProperty(value = "领取时间，yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "领取时间，yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime receiveTime;

    /**
     * 未使用：NOT_USED，已使用：USED，已过期：EXPIRED
     */
    @ApiModelProperty(value = "未使用：NOT_USED，已使用：USED，已过期：EXPIRED")
    @Excel(name = "未使用：NOT_USED，已使用：USED，已过期：EXPIRED")
    private String useStatus;

    /**
     * 优惠券名称
     */
    @ApiModelProperty(value = "优惠券名称")
    @Excel(name = "优惠券名称")
    private String couponTitle;

    /**
     * 优惠券面额
     */
    @ApiModelProperty(value = "优惠券面额")
    @Excel(name = "优惠券面额")
    private BigDecimal couponPrice;

    /**
     * 优惠券适用门槛
     */
    @ApiModelProperty(value = "优惠券适用门槛")
    @Excel(name = "优惠券适用门槛")
    private BigDecimal couponConsumePrice;

    /**
     * 优惠券概述，包括使用范围，使用注意事项等信息
     */
    @ApiModelProperty(value = "优惠券概述，包括使用范围，使用注意事项等信息")
    @Excel(name = "优惠券概述，包括使用范围，使用注意事项等信息")
    private String couponDescription;

    /**
     * 优惠券有效期，单位：天
     */
    private Integer couponReductionDays;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("patientId", getPatientId())
                .append("couponId", getCouponId())
                .append("receiveSource", getReceiveSource())
                .append("expirationStartTime", getExpirationStartTime())
                .append("expirationEndTime", getExpirationEndTime())
                .append("receiveTime", getReceiveTime())
                .append("useStatus", getUseStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
