chore: initialize qiming workspace repository
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.xspaceagi</groupId>
|
||||
<artifactId>app-platform-bill</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>app-platform-bill-spec</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.deploy.skip>true</maven.deploy.skip>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.xspaceagi</groupId>
|
||||
<artifactId>system-sdk</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BizTypeEnum {
|
||||
CREDIT_PURCHASE("CreditPurchase", "积分购买"),
|
||||
SUBSCRIPTION("Subscription", "订阅");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static BizTypeEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (BizTypeEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum LimitModeEnum {
|
||||
ALL("ALL", "同时满足"),
|
||||
ANY("ANY", "任一满足");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static LimitModeEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (LimitModeEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum OrderStatusEnum {
|
||||
PENDING("PENDING", "待支付"),
|
||||
PAID("PAID", "已支付"),
|
||||
CANCELLED("CANCELLED", "已取消");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static OrderStatusEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (OrderStatusEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PayStatusEnum {
|
||||
PENDING("PENDING", "待支付"),
|
||||
PROCESSING("PROCESSING", "处理中"),
|
||||
SUCCESS("SUCCESS", "支付成功"),
|
||||
FAILED("FAILED", "支付失败"),
|
||||
CLOSED("CLOSED", "已关闭");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static PayStatusEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (PayStatusEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ResourceStatTypeEnum {
|
||||
CONSUMPTION("CONSUMPTION", "消费"),
|
||||
SALES("SALES", "销售");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static ResourceStatTypeEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (ResourceStatTypeEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum RevenueStatusEnum {
|
||||
PENDING("PENDING", "待结算"),
|
||||
WITHDRAW_APPLYING("WITHDRAW_APPLYING", "提现申请中"),
|
||||
PAYING("PAYING", "打款中"),
|
||||
SETTLED("SETTLED", "已结算");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static RevenueStatusEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (RevenueStatusEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum RevenueTargetTypeEnum {
|
||||
AGENT("Agent", "智能体"),
|
||||
SKILL("Skill", "技能"),
|
||||
MODEL("Model", "模型"),
|
||||
PLUGIN("Plugin", "插件"),
|
||||
MCP("Mcp", "MCP"),
|
||||
WORKFLOW("Workflow", "工作流");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static RevenueTargetTypeEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (RevenueTargetTypeEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum RevenueTypeEnum {
|
||||
PLAN("Plan", "计划购买"),
|
||||
MODEL_CALL("ModelCall", "模型调用"),
|
||||
TOOL_CALL("ToolCall", "工具调用");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static RevenueTypeEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (RevenueTypeEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum TargetTypeEnum {
|
||||
PLAN("Plan", "订阅计划"),
|
||||
CREDIT_PACKAGE("CreditPackage", "积分套餐");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static TargetTypeEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (TargetTypeEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.xspaceagi.bill.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WithdrawStatusEnum {
|
||||
PENDING_REVIEW("PENDING_REVIEW", "待审核"),
|
||||
APPROVED("APPROVED", "已通过"),
|
||||
REJECTED("REJECTED", "已驳回"),
|
||||
PAID("PAID", "已打款");
|
||||
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static WithdrawStatusEnum fromCode(String code) {
|
||||
if (code == null) return null;
|
||||
for (WithdrawStatusEnum e : values()) {
|
||||
if (e.getCode().equals(code)) return e;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user