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.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

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

/**
 * <p>
 * 资金账户
 * </p>
 *
 * @author
 * @since 2024-10-16
 */
@Getter
@Setter
@TableName("capital_account")
public class CapitalAccount extends BaseIdPo {

    /**
     * 公司id
     */
    @NotNull(groups = {AddGroup.class, EditGroup.class})
    private Long corporationId;

    /**
     * 账户别名
     */
    @NotBlank(groups = {AddGroup.class, EditGroup.class})
    private String accountAlias;

    /**
     * 开户银行
     */
    private String depositBank;

    /**
     * 账户名
     */
    private String accountName;

    /**
     * 账号
     */
    private String account;

    /**
     * 联行号
     */
    private String correspondentNumber;

    /**
     * 账户余额
     */
    private BigDecimal amount;

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

    /**
     * 创建人
     */
    @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;

}
