- add optional description to scenario and environment entities - expose description in create/update DTOs, MCP tools, and export DTOs - render description as markdown on detail pages - add description editor (CodeEditor) to create/edit forms for both resources
33 lines
545 B
TypeScript
33 lines
545 B
TypeScript
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
PrimaryGeneratedColumn,
|
|
UpdateDateColumn,
|
|
} from "typeorm";
|
|
|
|
export interface EnvironmentData {
|
|
[key: string]: string | undefined;
|
|
}
|
|
|
|
@Entity("environments")
|
|
export class EnvironmentEntity {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@Column({ unique: true })
|
|
name: string;
|
|
|
|
@Column("text", { nullable: true })
|
|
description: string | null;
|
|
|
|
@Column("simple-json")
|
|
data: EnvironmentData;
|
|
|
|
@CreateDateColumn()
|
|
createdAt: Date;
|
|
|
|
@UpdateDateColumn()
|
|
updatedAt: Date;
|
|
}
|