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

import com.zhongshu.card.client.type.DataState;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import com.zhongshu.card.server.core.domain.org.UserAccount;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.mongodb.core.mapping.DBRef;
import org.springframework.data.mongodb.core.mapping.Document;

import java.math.BigDecimal;

/**
 * 个人钱包
 *
 * @author TRX
 * @date 2024/6/28
 */
@Data
@Builder
@Document
@AllArgsConstructor
@NoArgsConstructor
public class Wallet extends SuperMain {

    @Schema(description = "用户userId")
    private String userId;

    @Schema(description = "用户信息")
    @DBRef(lazy = true)
    private UserAccount userAccount;

//    @Schema(description = "类型")
//    private WalletType walletType;

    @Schema(description = "支付账户-对应支付中心")
    private String payAccount;

    @Schema(description = "余额,单位：分")
    private BigDecimal amount = BigDecimal.ZERO;

    @Schema(description = "钱包状态：是否可用")
    private DataState dataState = DataState.Enable;

}
