package com.ruoyi.ss.channel.domain;

import com.fasterxml.jackson.annotation.JsonView;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.JsonViewProfile;
import com.ruoyi.common.core.domain.ValidGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * 充值渠道对象 sm_channel
 *
 * @author ruoyi
 * @date 2024-04-15
 */
@Data
public class Channel extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @JsonView(JsonViewProfile.App.class)
    private Long channelId;

    /** 渠道名称 */
    @Excel(name = "渠道名称")
    @JsonView(JsonViewProfile.App.class)
    private String name;

    /** 是否启用 */
    @Excel(name = "是否启用")
    private Boolean enabled;

    /** 服务费费率% */
    @Excel(name = "服务费费率%")
    @Min(value = 0, message = "服务费费率不允许低于0", groups = {ValidGroup.Update.class})
    private BigDecimal serviceRate;

    /** 成本率% */
    @Excel(name = "成本率%")
    @Min(value = 0, message = "成本率不允许低于0", groups = {ValidGroup.Update.class})
    private BigDecimal costRate;

    @Excel(name = "服务费类型")
    @ApiModelProperty("服务费类型")
    private String serviceType;

    @ApiModelProperty("渠道图片")
    @JsonView(JsonViewProfile.App.class)
    private String picture;

    @Excel(name = "适用平台(1微信 2支付宝）")
    @ApiModelProperty("适用平台(1微信 2支付宝）")
    private String platform;
}
