feat: api keys

This commit is contained in:
Ahmed Bouhuolia
2025-07-01 23:05:58 +02:00
parent 9f6e9e85a5
commit 84cb7693c8
16 changed files with 266 additions and 8 deletions

View File

@@ -0,0 +1,25 @@
import { SystemModel } from '@/modules/System/models/SystemModel';
export class ApiKeyModel extends SystemModel {
readonly key: string;
readonly name?: string;
readonly createdAt: Date;
readonly expiresAt?: Date;
readonly revoked?: boolean;
readonly userId: number;
readonly tenantId: number;
/**
* Table name
*/
static get tableName() {
return 'api_keys';
}
/**
* Timestamps columns.
*/
get timestamps() {
return ['createdAt'];
}
}