package com.czg.market.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import java.io.Serial;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 分销配置 实体类。
 *
 * @author ww
 * @since 2025-10-25
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("mk_distribution_config")
@Accessors(chain = true)
public class MkDistributionConfig implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Long id;

    /**
     * 是否开启
     */
    private Integer isEnable;

    /**
     * pay购买开通 auto自动开通 manual手动开通
     */
    private String openType;

    /**
     * 邀请条件人数
     */
    private Integer inviteCount;

    /**
     * 被邀请人消费有效 0 1
     */
    private Integer inviteConsume;

    /**
     * 购买开通金额
     */
    private BigDecimal payAmount;

    /**
     * 每人奖励次数
     */
    private Integer rewardCount;

    /**
     * n天结算
     */
    private Integer settlementDay;

    /**
     * not_upgrade不自动升级 invite邀请有效人数 cost消费金额
     */
    private String upgradeType;

    /**
     * 未开通页面富文本
     */
    private String notActivatedPage;

    /**
     * 创建时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;

    private Long shopId;

}
