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>
|
||||
<artifactId>app-platform-subscription</artifactId>
|
||||
<groupId>com.xspaceagi</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>app-platform-subscription-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,28 @@
|
||||
package com.xspaceagi.subscription.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum BizTypeEnum {
|
||||
|
||||
SYSTEM("SYSTEM", "系统全局"),
|
||||
AGENT("AGENT", "智能体"),
|
||||
SKILL("SKILL", "技能");
|
||||
|
||||
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,29 @@
|
||||
package com.xspaceagi.subscription.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PlanPeriodEnum {
|
||||
|
||||
MONTH(1, "月"),
|
||||
QUARTER(3, "季度"),
|
||||
YEAR(12, "年"),
|
||||
FOREVER(0, "永久");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
public static PlanPeriodEnum getByCode(Integer code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
}
|
||||
for (PlanPeriodEnum e : values()) {
|
||||
if (e.getCode().equals(code)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.xspaceagi.subscription.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum PlanStatusEnum {
|
||||
|
||||
OFFLINE(0, "下线"),
|
||||
ONLINE(1, "上线");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
public boolean isOnline() {
|
||||
return ONLINE.equals(this);
|
||||
}
|
||||
|
||||
public static PlanStatusEnum getByCode(Integer code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
}
|
||||
for (PlanStatusEnum e : values()) {
|
||||
if (e.getCode().equals(code)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.xspaceagi.subscription.spec.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum SubscriptionStatusEnum {
|
||||
|
||||
ACTIVE(0, "生效中"),
|
||||
EXPIRED(1, "已过期"),
|
||||
CANCELLED(2, "已取消");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
public static SubscriptionStatusEnum getByCode(Integer code) {
|
||||
if (code == null) {
|
||||
return null;
|
||||
}
|
||||
for (SubscriptionStatusEnum e : values()) {
|
||||
if (e.getCode().equals(code)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user