package com.dk.mdm.model.pojo.mst;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import com.dk.common.infrastructure.annotaiton.ExportTitle;
import com.dk.common.infrastructure.handler.TimestampTypeHandler;
import com.dk.common.infrastructure.handler.UuidTypeHandler;
import com.dk.common.model.pojo.PageInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 *  资金流水明细
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExportTitle("资金流水明细")
@TableName(value = "t_mst_money_account_item", autoResultMap = true, schema = "dkic_b")
@ApiModel(value="实体类：资金流水明细", description="表名：t_mst_money_account_item")
public class MoneyAccountItem extends PageInfo<MoneyAccountItem> implements Serializable {

    /*
     * 数据库字段
     */

    /**
     * 明细ID
     */
    @TableId(value = "item_id", type = IdType.AUTO)
    @ApiModelProperty(value = "明细ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String itemId;


    /**
     * 资金账户ID
     */
    @Excel(name = "资金账户ID")
    @ApiModelProperty(value = "资金账户ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String macId;


    /**
     * 流水类型 (【系统字典】：收付款、转账)
     */
    @Excel(name = "流水类型 (【系统字典】：收付款、转账)")
    @ApiModelProperty(value = "流水类型 (【系统字典】：收付款、转账)")
    private String flowType;


    /**
     * 流水单ID (为空时为期初)
     */
    @Excel(name = "流水单ID (为空时为期初)")
    @ApiModelProperty(value = "流水单ID (为空时为期初)")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String invoiceId;


    /**
     * 流入金额 (流入为正数，流出为负数)
     */
    @Excel(name = "流入金额 (流入为正数，流出为负数)")
    @ApiModelProperty(value = "流入金额 (流入为正数，流出为负数)")
    private BigDecimal amtInflow;


    /**
     * 账务日期 (账务日期)
     */
    @Excel(name = "账务日期 (账务日期)")
    @ApiModelProperty(value = "账务日期 (账务日期)")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDate accDate;


    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remarks;


    /**
     * 制单员
     */
    @Excel(name = "制单员")
    @ApiModelProperty(value = "制单员")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String makeStaff;


    /**
     * 制单时间
     */
    @Excel(name = "制单时间")
    @ApiModelProperty(value = "制单时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDateTime makeTime;


    /**
     * 有效标识 (1：正常 0：停用)
     */
    @Excel(name = "有效标识 (1：正常 0：停用)")
    @ApiModelProperty(value = "有效标识 (1：正常 0：停用)")
    private Boolean flgValid;


    /**
     * 企业ID
     */
    @TableField(fill = FieldFill.INSERT)
    @Excel(name = "企业ID")
    @ApiModelProperty(value = "企业ID")
    private Integer cpId;



    private static final long serialVersionUID = 1L;

}
