"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthTokenSchema = exports.AuthToken = void 0;
const core_1 = require("@mikro-orm/core");
class AuthToken {
}
exports.AuthToken = AuthToken;
exports.AuthTokenSchema = new core_1.EntitySchema({
    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()',
        },
    },
});
