package org.jeecg.modules.system.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

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

@Data
@TableName("nm_shop_money")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="账户资金变动记录表")
public class ShopMoney implements Serializable {
    private static final long serialVersionUID = 1L;

    /**主键ID*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键ID")
    private String id;

    /**组织编号*/
    @Excel(name = "组织编号", width = 15)
    @Schema(description = "组织编号")
    private String orgCode;

    /**收支类型（1、支出  2、收入）*/
    @Excel(name = "收支类型（1、支出  2、收入）", width = 15)
    @Schema(description = "收支类型（1、支出  2、收入）")
    private Integer incomeType;

    /**金额类型（1、可用余额 2、待结算）*/
    @Excel(name = "金额类型（1、可用余额 2、待结算）", width = 15)
    @Schema(description = "金额类型（1、可用余额 2、待结算）")
    private Integer moneyType;

    /**订单编号*/
    @Excel(name = "订单编号", width = 15)
    @Schema(description = "订单编号")
    private String orderCode;

    /**改变前金额*/
    @Excel(name = "改变前金额", width = 15)
    @Schema(description = "改变前金额")
    private BigDecimal beforeChange;

    /**改变后金额*/
    @Excel(name = "改变后金额", width = 15)
    @Schema(description = "改变后金额")
    private BigDecimal afterChange;

    /**改变金额*/
    @Excel(name = "改变金额", width = 15)
    @Schema(description = "改变金额")
    private BigDecimal moneyChange;

    /**改变原因（1、用户支付 2、用户退款 3、分账）*/
    @Excel(name = "改变原因（1、用户支付 2、用户退款 3、分账）", width = 15)
    @Schema(description = "改变原因（1、用户支付 2、用户退款 3、分账）")
    private Integer changeInfo;

    /**创建时间;创建时间*/
    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建时间;创建时间")
    private Date createTime;
}
