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

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.JSONArray;
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.JsonTypeHandler;
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;

/**
 *  资金账户
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExportTitle("资金账户")
@TableName(value = "t_mst_money_account", autoResultMap = true)
@ApiModel(value="实体类：资金账户", description="表名：t_mst_money_account")
public class MoneyAccountResponse extends PageInfo<MoneyAccountResponse> implements Serializable {

    /*
     * 数据库字段
     */

    /**
     * 资金账户ID
     */
//    @TableId(value = "mac_id", type = IdType.AUTO)
    @ApiModelProperty(value = "资金账户ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String macId;


    /**
     * 资金账户编码
     */
    @Excel(name = "资金账户编码")
    @ApiModelProperty(value = "资金账户编码")
    private String macCode;


    /**
     * 资金账户名称
     */
    @Excel(name = "资金账户名称")
    @ApiModelProperty(value = "资金账户名称")
    private String macName;


    /**
     * 账户类别 (【数据字典】)
     */
    @Excel(name = "账户类别 (【数据字典】)")
    @ApiModelProperty(value = "账户类别 (【数据字典】)")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String macType;


    /**
     * 账户余额
     */
    @Excel(name = "账户余额")
    @ApiModelProperty(value = "账户余额")
    private BigDecimal balance;


    /**
     * 显示顺序 (【1 ～ 46655】)
     */
    @Excel(name = "显示顺序 (【1 ～ 46655】)")
    @ApiModelProperty(value = "显示顺序 (【1 ～ 46655】)")
    private Integer displayNo;


    /**
     * 默认值
     */
    @Excel(name = "默认值")
    @ApiModelProperty(value = "默认值")
    private Boolean flgDefault;



    /**
     * 收款码 (图片路径)
     */
    @Excel(name = "收款码 (图片路径)")
    @ApiModelProperty(value = "收款码 (图片路径)")
    @TableField(typeHandler = JsonTypeHandler.class)
    private JSONArray macReceiptCode;


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


    /**
     * 允许账户余额为负数
     */
    @Excel(name = "允许账户余额为负数")
    @ApiModelProperty(value = "允许账户余额为负数")
    private Boolean flgNegative;


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


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


    /**
     * 企业ID
     */
    @Excel(name = "企业ID")
    @ApiModelProperty(value = "企业ID")
    private Integer cpId;


    @ApiModelProperty(value = "账户类别 (【数据字典】)")
    private String macTypeName;

    @ApiModelProperty(value = "期初余额")
    private BigDecimal initBalance;

    private static final long serialVersionUID = 1L;

}
