import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, } from "typeorm"; @Entity("snippets") export class SnippetEntity { @PrimaryGeneratedColumn("uuid") id: string; /** Unique identifier used to call the snippet: helpers.runSnippet('mySnippet', ...) */ @Column({ unique: true }) name: string; @Column("text", { nullable: true }) description: string | null; /** * The snippet body — written as a regular async function body. * It receives the same `page`, `context`, and `helpers` as exec code, plus * any positional `...args` passed by the caller. */ @Column("text") code: string; @CreateDateColumn() createdAt: Date; @UpdateDateColumn() updatedAt: Date; }