Full-stack implementation of the Reckue Dev platform: API: JWT auth, CRUD for users/projects/machines/workspaces/sessions, WebSocket gateway for real-time agent communication. Web: Login/register, dashboard with stats, project/machine/session management pages, sidebar navigation, dark theme. Agent: Rust WebSocket client with PTY terminal management, heartbeat, reconnection logic, Socket.IO protocol support. Deploy: Updated docker-compose and env configuration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
686 B
TypeScript
31 lines
686 B
TypeScript
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, ManyToOne, JoinColumn } from 'typeorm';
|
|
import { Workspace } from './workspace.entity';
|
|
|
|
@Entity('sessions')
|
|
export class Session {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column()
|
|
workspaceId: string;
|
|
|
|
@Column({ default: 'stopped' })
|
|
status: string;
|
|
|
|
@Column({ nullable: true })
|
|
command: string;
|
|
|
|
@ManyToOne(() => Workspace, workspace => workspace.sessions)
|
|
@JoinColumn({ name: 'workspaceId' })
|
|
workspace: Workspace;
|
|
|
|
@CreateDateColumn()
|
|
startedAt: Date;
|
|
|
|
@Column({ type: 'timestamp', nullable: true })
|
|
stoppedAt: Date;
|
|
|
|
@UpdateDateColumn()
|
|
updatedAt: Date;
|
|
}
|