package com.dk.mdm.model.query.mac;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
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_mac_rec_pay_item", autoResultMap = true)
@ApiModel(value="实体类：收付款单明细", description="表名：t_mac_rec_pay_item")
public class RecPayItemQuery extends PageInfo<RecPayItemQuery> 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 rpId;


    /**
     * 收付款账户
     */
    @Excel(name = "收付款账户")
    @ApiModelProperty(value = "收付款账户")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String macId;


    /**
     * 收款金额 (对客户（收款为正数、退收款为负数）)
     */
    @Excel(name = "收款金额 (对客户（收款为正数、退收款为负数）)")
    @ApiModelProperty(value = "收款金额 (对客户（收款为正数、退收款为负数）)")
    private BigDecimal amtRec;


    /**
     * 付款金额 (对供应商（付款为正数、退付款为负数）)
     */
    @Excel(name = "付款金额 (对供应商（付款为正数、退付款为负数）)")
    @ApiModelProperty(value = "付款金额 (对供应商（付款为正数、退付款为负数）)")
    private BigDecimal amtPay;


    /**
     * 账款明细ID
     */
    @Excel(name = "账款明细ID")
    @ApiModelProperty(value = "账款明细ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String accItemId;


    /**
     * 收付款日期 (账务日期)
     */
    @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;

}
