package com.xinelu.manage.domain.patientintegralchange;

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.time.LocalDateTime;

/**
 * 会员积分变更记录对象 patient_integral_change
 *
 * @author xinyilu
 * @date 2023-02-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "会员积分变更记录对象", description = "patient_integral_change")
public class PatientIntegralChange extends BaseDomain implements Serializable {
    private static final long serialVersionUID = 3874412439515378186L;
    /**
     * 主键id
     */
    private Long id;

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

    /**
     * 原始积分
     */
    @ApiModelProperty(value = "原始积分")
    @Excel(name = "原始积分")
    private Integer originalIntegral;

    /**
     * 变动积分
     */
    @ApiModelProperty(value = "变动积分")
    @Excel(name = "变动积分")
    private Integer changeIntegral;

    /**
     * 积分变更时间
     */
    @ApiModelProperty(value = "积分变更时间")
    @JsonFormat(pattern = "yyyy-MM-dd, HH:mm:ss")
    @Excel(name = "积分变更时间", width = 30, dateFormat = "yyyy-MM-dd, HH:mm:ss")
    private LocalDateTime changeTime;

    /**
     * 积分变动类型，商品兑换：COMMODITY_EXCHANGE，好友邀请：FRIEND_INVITATION，观看视频：WATCH_VIDEO，
     * 会员签到：SIGN_IN
     */
    @ApiModelProperty(value = "积分变动类型，商品兑换：COMMODITY_EXCHANGE，好友邀请：FRIEND_INVITATION，观看视频：WATCH_VIDEO，会员签到：SIGN_IN")
    @Excel(name = "积分变动类型，商品兑换：COMMODITY_EXCHANGE，好友邀请：FRIEND_INVITATION，观看视频：WATCH_VIDEO，会员签到：SIGN_IN")
    private String changeType;

    /**
     * 积分变更描述
     */
    @ApiModelProperty(value = "积分变更描述")
    @Excel(name = "积分变更描述")
    private String changeRemark;

    /**
     * 积分变更方式，手机App：MOBILE_APP，微信小程序：WECHAT_APPLET，支付宝小程序：ALI_PAY_APPLET
     */
    @ApiModelProperty(value = "积分变更方式，手机App：MOBILE_APP，微信小程序：WECHAT_APPLET，支付宝小程序：ALI_PAY_APPLET")
    @Excel(name = "积分变更方式，手机App：MOBILE_APP，微信小程序：WECHAT_APPLET，支付宝小程序：ALI_PAY_APPLET")
    private String changeIntegralChannel;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("patientId", getPatientId())
                .append("originalIntegral", getOriginalIntegral())
                .append("changeIntegral", getChangeIntegral())
                .append("changeTime", getChangeTime())
                .append("changeType", getChangeType())
                .append("changeRemark", getChangeRemark())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
