Initial commit - Event Planner application

This commit is contained in:
mberlin
2026-03-18 14:55:56 -03:00
commit 86d779eb4d
7548 changed files with 1006324 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
import { EntitySchema } from '@mikro-orm/core';
export class AuthToken {
id!: string;
tenantId!: string;
token!: string;
name?: string;
expiresAt?: Date;
metadata?: Record<string, any>;
createdAt!: Date;
updatedAt!: Date;
}
export const AuthTokenSchema = new EntitySchema<AuthToken>({
class: AuthToken,
tableName: 'auth_tokens',
properties: {
id: {
primary: true,
type: 'uuid',
default: 'uuid_generate_v4()',
},
tenantId: {
type: 'string',
nullable: false,
},
token: {
type: 'string',
nullable: false,
},
name: {
type: 'string',
nullable: true,
},
expiresAt: {
type: 'date',
nullable: true,
},
metadata: {
type: 'json',
nullable: true,
},
createdAt: {
type: 'date',
nullable: false,
defaultRaw: 'now()',
},
updatedAt: {
type: 'date',
nullable: false,
defaultRaw: 'now()',
},
},
});