feat: add runtime management domain records
- Environment, EnvironmentStatus, App, AppVersion - Deployment, DeploymentStatus, RoutingMode Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package com.cameleer3.server.core.runtime;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
||||
public record App(UUID id, UUID environmentId, String slug, String displayName, Instant createdAt) {}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cameleer3.server.core.runtime;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
||||
public record AppVersion(UUID id, UUID appId, int version, String jarPath, String jarChecksum,
|
||||
String jarFilename, Long jarSizeBytes, Instant uploadedAt) {}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.cameleer3.server.core.runtime;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
||||
public record Deployment(UUID id, UUID appId, UUID appVersionId, UUID environmentId,
|
||||
DeploymentStatus status, String containerId, String containerName,
|
||||
String errorMessage, Instant deployedAt, Instant stoppedAt, Instant createdAt) {
|
||||
public Deployment withStatus(DeploymentStatus newStatus) {
|
||||
return new Deployment(id, appId, appVersionId, environmentId, newStatus,
|
||||
containerId, containerName, errorMessage, deployedAt, stoppedAt, createdAt);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package com.cameleer3.server.core.runtime;
|
||||
|
||||
public enum DeploymentStatus { STARTING, RUNNING, FAILED, STOPPED }
|
||||
@@ -0,0 +1,6 @@
|
||||
package com.cameleer3.server.core.runtime;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.UUID;
|
||||
|
||||
public record Environment(UUID id, String slug, String displayName, EnvironmentStatus status, Instant createdAt) {}
|
||||
@@ -0,0 +1,3 @@
|
||||
package com.cameleer3.server.core.runtime;
|
||||
|
||||
public enum EnvironmentStatus { ACTIVE, SUSPENDED }
|
||||
@@ -0,0 +1,3 @@
|
||||
package com.cameleer3.server.core.runtime;
|
||||
|
||||
public enum RoutingMode { path, subdomain }
|
||||
Reference in New Issue
Block a user