package com.xunhong.erp.turbo.biz.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xunhong.erp.turbo.api.biz.dto.enums.CompanyPaymentAccountCategoryEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.CompanyPaymentAccountTypeEnum;
import com.xunhong.erp.turbo.api.biz.dto.enums.CompanyPaymentPublicAccountTypeEnum;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "company_payment_account")
@EqualsAndHashCode(callSuper = true)
public class CompanyPaymentAccountDO extends BaseDO<CompanyPaymentAccountDO> {

	/**
	 * 账户ID
	 */
	@TableId(value = "account_id", type = IdType.ASSIGN_ID)
	private Long accountId;

	/**
	 * 公司ID
	 */
	@TableField(value = "company_id")
	private Long companyId;

	/**
	 * 账户类别：1_对公账户；2_私人账户
	 */
	@TableField(value = "account_category")
	private CompanyPaymentAccountCategoryEnum accountCategory;

	/**
	 * 账户类型：1_银行卡；2_支付宝；3_微信
	 */
	@TableField(value = "account_type")
	private CompanyPaymentAccountTypeEnum accountType;

	/**
	 * 银行名称
	 */
	@TableField(value = "bank_name")
	private String bankName;

	/**
	 * 支行名称
	 */
	@TableField(value = "branch_name")
	private String branchName;

	/**
	 * 对公账户类型：1_基本户；2_一般户；3_专用账户；4_临时户
	 */
	@TableField(value = "public_account_type")
	private CompanyPaymentPublicAccountTypeEnum publicAccountType;

	/**
	 * 开户公司名称、支付宝昵称、微信号
	 */
	@TableField(value = "account_name")
	private String accountName;

	/**
	 * 银行账号、支付宝账号、微信账号
	 */
	@TableField(value = "account_number")
	private String accountNumber;

	/**
	 * 是否主付款账户：0_否；1_是
	 */
	@TableField(value = "is_primary")
	private Boolean isPrimary;

	/**
	 * 备注
	 */
	@TableField(value = "remark")
	private String remark;

	/**
	 * 状态：1_启用；2_禁用；
	 */
	@TableField(value = "status")
	private Boolean status;

	/**
	 * 创建时间
	 */
	@TableField(value = "created_at")
	private LocalDateTime createdAt;

	@TableField(exist = false)
	private CompanyDO companyDO;

}

