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

import com.github.microservice.types.payment.PaymentType;
import com.zhongshu.card.server.core.domain.base.SuperMain;
import com.zhongshu.card.server.core.domain.org.Organization;
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/9/25
 */
@Data
@Builder
@Document
@AllArgsConstructor
@NoArgsConstructor
public class PayShareList extends SuperMain {

    @Schema(description = "项目信息")
    @DBRef(lazy = true)
    private Organization projectInfo;

    @Schema(description = "项目名称")
    private String projectName;

    @Schema(description = "项目编码")
    private String projectCode;

    @Schema(description = "关联数据ID")
    private String aboutDataId;

    @Schema(description = "支付渠道")
    private PaymentType paymentType;

    //-----------------------------业务 start----------------------

    @Schema(description = "规则名称")
    private String name;

    @Schema(description = "项目分账比例，0-100")
    private BigDecimal projectScale = BigDecimal.ZERO;

    @Schema(description = "机构分账比例，0-100")
    private BigDecimal orgScale = BigDecimal.ZERO;

}
