rename entities

This commit is contained in:
jubnl
2026-09-20 20:05:18 +02:00
parent 7cd9ba3dcb
commit 55ad55e90b
120 changed files with 344 additions and 344 deletions
+33
View File
@@ -0,0 +1,33 @@
import { type Opt, defineEntity, p, EntityRepository } from '@mikro-orm/core';
export interface AddonConfig {
[key: string]: unknown;
}
export class Addons {
id?: string | null;
name!: string;
description?: string | null;
type: string & Opt = 'global';
icon: string & Opt = 'Puzzle';
enabled?: boolean & Opt = false;
config: AddonConfig & Opt | null = {};
sortOrder?: number | null = 0;
}
export class AddonsRepository extends EntityRepository<Addons>{}
export const AddonsSchema = defineEntity({
class: Addons,
repository: () => AddonsRepository,
properties: {
id: p.text().primary(),
name: p.text(),
description: p.text().nullable(),
type: p.text(),
icon: p.text().nullable(),
enabled: p.boolean().default(false),
config: p.json<AddonConfig>().nullable(),
sortOrder: p.integer().nullable(),
},
});