package com.izouma.nineth.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.izouma.nineth.annotations.Searchable;
import com.izouma.nineth.annotations.SearchableOne;
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 {
    @ExcelProperty("用户ID")
    @ApiModelProperty("用户ID")
    @Searchable
    private Long userId;

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

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

    @ExcelProperty("藏品ID")
    @ApiModelProperty("藏品ID")
    private Long collectionId;

    @ExcelProperty("名称")
    @SearchableOne
    @ApiModelProperty("名称")
    private String name;

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

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

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

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