package com.yunniu.farming.webadmin.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.yunniu.farming.common.plugin.PageInfo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Integralrec {

	//积分获取类型[10:下单奖励 20.系统赠送 30新用户赠送 50:下单抵扣 60:兑换商品]
	public static final Integer INTEGRALREC_NEWORD = 10;
    public static final Integer INTEGRALREC_ADMIN = 20;
    public static final Integer INTEGRALREC_NEWUSR = 30;

    public static final Integer INTEGRALREC_ORDOUT = 50;
    public static final Integer INTEGRALREC_DUIPRO = 60;

    //用户
    private Customer customer;

	//辅助对象:分页信息对象
	@TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
	private PageInfo pageinfo;
	@TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer curpage; // 分页页码
	@TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer pagesize; // 分页个数
    @TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String selectsname;//按用户名称搜索

	//积分管理辅助字段
	@TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
	private Double ininteNum;//剩余积分
	@TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer inintegralrec;//收入积分总数
	@TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer outintegralrec;//支出积分总数
	

	//数据库字段
    private Integer id; //积分记录id
    private String sdesc; //B:详情
    private Integer sysadminid;  //管理员id
    private Integer orderid;      //订单id
    private Integer customerid;  //客户id
    private Integer itype;       //类型
    private Double dincome;  //收入积分
    private Double dexpend;  //支出积分
    private String soprdate;       //操作日期
    private Date toprtime;       //操作时间
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String sdef1;        //自定义项1
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String sdef2;        //自定义项2
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String sdef3;        //自定义项3
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String sdef4;        //自定义项4
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String sdef5;        //自定义项5
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer idef6;       //自定义项6
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer idef7;       //自定义项7
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal ddef8;    //自定义项8
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private BigDecimal ddef9;    //自定义项9
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Date ddef10;         //自定义项10


}