package com.gxwebsoft.shop.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 分销商订单记录表
 *
 * @author 科技小王子
 * @since 2025-08-12 11:55:18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopDealerOrder对象", description = "分销商订单记录表")
public class ShopDealerOrder implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "买家用户ID")
    private Integer userId;

    @Schema(description = "订单ID")
    private Integer orderId;

    @Schema(description = "订单总金额(不含运费)")
    private BigDecimal orderPrice;

    @Schema(description = "分销商用户id(一级)")
    private Integer firstUserId;

    @Schema(description = "分销商用户id(二级)")
    private Integer secondUserId;

    @Schema(description = "分销商用户id(三级)")
    private Integer thirdUserId;

    @Schema(description = "分销佣金(一级)")
    private BigDecimal firstMoney;

    @Schema(description = "分销佣金(二级)")
    private BigDecimal secondMoney;

    @Schema(description = "分销佣金(三级)")
    private BigDecimal thirdMoney;

    @Schema(description = "订单是否失效(0未失效 1已失效)")
    private Integer isInvalid;

    @Schema(description = "佣金结算(0未结算 1已结算)")
    private Integer isSettled;

    @Schema(description = "结算时间")
    private LocalDateTime settleTime;

    @Schema(description = "商城ID")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

}
