package com.izouma.nineth.domain;

import com.izouma.nineth.annotations.Searchable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import java.math.BigDecimal;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("分销记录")
public class CommissionRecord extends BaseEntity {
    @ApiModelProperty("用户ID")
    @Searchable
    private Long userId;

    @ApiModelProperty("用户名")
    @Searchable
    private String nickname;

    @ApiModelProperty("手机")
    @Searchable
    private String phone;

    @ApiModelProperty("订单ID")
    @Searchable
    private Long orderId;

    @ApiModelProperty("订单总价")
    private BigDecimal totalPrice;

    @ApiModelProperty("分成比例")
    private BigDecimal shareRatio;

    @ApiModelProperty("分成金额")
    private BigDecimal shareAmount;
}
