/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.distribution.comment.model;

import com.yami.shop.bean.model.Order;
import com.yami.shop.bean.model.OrderItem;
import com.yami.shop.distribution.comment.vo.DistributionUserVO;
import com.yami.shop.bean.vo.SysUserVO;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.*;

@Data
@TableName( "tz_distribution_user_income")
public class DistributionUserIncome implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 收入记录id
     */
    @TableId
    private Long incomeId;

    /**
     * 钱包id
     */
    private Long walletId;

    /**
     * 收入类型(0其他、1一代奖励、2二代奖励、3邀请奖励 )
     */
    private Integer incomeType;

    /**
     * 佣金状态(0:待支付、1:待结算、2:已结算、-1:订单失效)
     */
    private Integer state;

    /**
     * 佣金数额
     */
    private Double incomeAmount;

    /**
     * 关联订单项号
     */
    private Long orderItemId;

    /**
     * 商户订单号
     */
    private Long merchantOrderId;

    /**
     * 分销员id
     */
    private Long distributionUserId;

    /**
     * 订单号
     */
    private String orderNumber;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 关联分销员
     */
    @TableField(exist = false)
    private DistributionUserVO distributionUser;

    /**
     * 关联订单
     */
    @TableField(exist = false)
    private Order order;

    /**
     * 关联操作人
     */
    @TableField(exist = false)
    private SysUserVO sysUserVO;

    /**
     * 订单项
     */
    @TableField(exist = false)
    private OrderItem orderItem;

}
