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;

/**
 * 分销员等级配置 实体类。
 *
 * @author ww
 * @since 2025-10-25
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("mk_distribution_level_config")
public class MkDistributionLevelConfig implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

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

    /**
     * 分销配置表id
     */
    private Long distributionConfigId;

    private Long shopId;
    /**
     * 名称
     */
    private String name;

    /**
     * 有效人数
     */
    private Integer inviteCount;
     /**
     * 等级
     */
    private Integer level;

    /**
     * 消费金额
     */
    private BigDecimal costAmount;

    /**
     * 一级分销比例
     */
    private BigDecimal commission;


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

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

}
