package com.jy.business.capital.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jy.framework.model.base.BaseIdPo;
import com.jy.framework.model.validation.AddGroup;
import com.jy.framework.model.validation.EditGroup;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

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

/**
 * <p>
 * 资金流水
 * </p>
 *
 * @author
 * @since 2025-01-07
 */
@Getter
@Setter
@TableName("capital_transactions")
public class CapitalTransactions extends BaseIdPo {

    /**
     * 资金账号id
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Long capitalAccountId;

    /**
     * 交易时间
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Date tradingTime;

    /**
     * 交易类型 1收入 0支出
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Integer type;

    /**
     * 交易金额
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private BigDecimal amount;

    /**
     * 对方类型
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Integer targetType;

    /**
     * 对方账户名
     */
    private String targetAccountName;

    /**
     * 对方开户银行
     */
    private String targetDepositBank;

    /**
     * 对方账号
     */
    private String targetAccount;

    /**
     * 备注
     */
    private String remark;

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 订单编号
     */
    private String orderCode;

    /**
     * 是否小程序 1是 0否
     */
    private Integer hasApplet;

    /**
     * 是否批单 1是 0否
     */
    private Integer hasBulkOrder;

    /**
     * 是否私账 1私帐 0公帐
     */
    private Integer hasPrivate;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 逻辑删除标记
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private String delFlag;

}
