ff-admin-server/src/entity/configuration/template.ts

31 lines
631 B
TypeScript
Raw Normal View History

2024-12-22 10:29:42 +01:00
import { Column, Entity, PrimaryColumn } from "typeorm";
@Entity()
export class template {
@PrimaryColumn({ generated: "increment", type: "int" })
id: number;
2025-01-28 11:09:42 +01:00
@Column({ type: "varchar", length: 255, unique: true })
2024-12-22 10:29:42 +01:00
template: string;
@Column({ type: "varchar", length: 255, nullable: true })
description?: string;
@Column({
type: "text",
default: "{}",
transformer: {
to(value: object) {
return JSON.stringify(value);
},
from(value: string) {
return JSON.parse(value);
},
},
})
design: object;
@Column({ type: "text", default: "" })
2024-12-22 17:29:11 +01:00
html: string;
2024-12-22 10:29:42 +01:00
}