package com.zhongshu.card.server.core.domain.pay;

import com.github.microservice.components.data.mongo.mongo.domain.SuperEntity;
import com.github.microservice.types.payment.PaymentChannelType;
import com.github.microservice.types.payment.PaymentType;
import com.zhongshu.card.client.type.payAccount.PayAccountLevel;
import com.zhongshu.card.server.core.domain.org.UserAccount;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.math.BigDecimal;

@Data
@Document
public class PayAccount extends SuperEntity {

    private String ledgerId;

    //父账户
    @DBRef(lazy = true)
    private PayAccount parent;

    //账户级别
    private PayAccountLevel level;

    //用户id
    private String userId;

    //机构id
    private String oid;

    //项目id
    private String projectOid;

    //账户类型（余额，无感支付，补贴， 扫码）
    private PaymentChannelType paymentChannelType;

    //支付渠道
    private PaymentType paymentType;

    //余额
    private BigDecimal amount;
}
