package com.xinelu.manage.domain.systemsettingsinfo;

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;
import java.math.BigDecimal;

/**
 * 泉医到家平台系统业务设置信息对象 system_settings_info
 *
 * @author xinyilu
 * @date 2023-02-23
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "泉医到家平台系统业务设置信息对象", description = "system_settings_info")
public class SystemSettingsInfo extends BaseDomain implements Serializable {
    private static final long serialVersionUID = -6656513779034486336L;
    /**
     * 主键id
     */
    private Long id;

    /**
     * 系统设置名称
     */
    @ApiModelProperty(value = "系统设置名称")
    @Excel(name = "系统设置名称")
    @NotBlank(message = "系统设置名称不能为空", groups = {Insert.class, Update.class})
    private String settingsName;

    /**
     * 系统设置编码
     */
    @ApiModelProperty(value = "系统设置编码")
    @Excel(name = "系统设置编码")
    private String settingsCode;

    /**
     * 系统设置内容
     */
    @ApiModelProperty(value = "系统设置内容")
    @Excel(name = "系统设置内容")
    private String settingsContent;

    /**
     * 系统设置类型，积分兑换：INTEGRAL_EXCHANGE_RULE，签到：SIGN_IN_RULE，积分抵扣：INTEGRAL_DEDUCTION，邀请好友：INVITE_FRIENDS
     */
    @ApiModelProperty(value = "系统设置类型，积分兑换：INTEGRAL_EXCHANGE_RULE，签到：SIGN_IN_RULE，积分抵扣：INTEGRAL_DEDUCTION，邀请好友：INVITE_FRIENDS")
    @Excel(name = "系统设置类型，积分兑换：INTEGRAL_EXCHANGE_RULE，签到：SIGN_IN_RULE，积分抵扣：INTEGRAL_DEDUCTION，邀请好友：INVITE_FRIENDS")
    @NotBlank(message = "系统设置类型不能为空", groups = {Insert.class, Update.class})
    private String settingsType;

    /**
     * 累计签到天数，签到设置使用
     */
    @ApiModelProperty(value = "累计签到天数，签到设置使用")
    @Excel(name = "累计签到天数，签到设置使用")
    private Integer totalSignInDays;

    /**
     * 积分数量，累计签到、邀请好友、积分抵扣等系统设置使用
     */
    @ApiModelProperty(value = "积分数量，累计签到、邀请好友、积分抵扣等系统设置使用")
    @Excel(name = "积分数量，累计签到、邀请好友、积分抵扣等系统设置使用")
    private Integer integralCount;

    /**
     * 积分抵扣金额，积分抵扣设置使用
     */
    @ApiModelProperty(value = "积分抵扣金额，积分抵扣设置使用")
    @Excel(name = "积分抵扣金额，积分抵扣设置使用")
    private BigDecimal creditAmount;

    /**
     * 显示顺序
     */
    @ApiModelProperty(value = "显示顺序")
    @Excel(name = "显示顺序")
    @NotNull(message = "系统设置类型不能为空", groups = {Insert.class, Update.class})
    private Integer sort;

    /**
     * 积分有效期，数值类型，单位是：天
     */
    @ApiModelProperty(value = "积分有效期，数值类型，单位是：天")
    @Excel(name = "积分有效期，数值类型，单位是：天")
    private Integer integralExpirationDate;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("settingsName", getSettingsName())
                .append("settingsCode", getSettingsCode())
                .append("settingsContent", getSettingsContent())
                .append("settingsType", getSettingsType())
                .append("totalSignInDays", getTotalSignInDays())
                .append("integralCount", getIntegralCount())
                .append("creditAmount", getCreditAmount())
                .append("integralExpirationDate", getIntegralExpirationDate())
                .append("sort", getSort())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
