feat: Filemagedon
Some checks failed
Build, check & Test / run (push) Failing after 1m45s
Lint / run (push) Failing after 48s
Build Docker Image / build_docker (push) Failing after 3m18s

Signed-off-by: Avior <git@avior.me>
This commit is contained in:
2024-09-11 14:38:58 +02:00
parent 3e91597dca
commit bc97d9106b
45 changed files with 4548 additions and 64 deletions

48
src/models/config.ts Normal file
View File

@ -0,0 +1,48 @@
import Schema from 'libs/Schema'
import type Dao from './Adapters/DaoAdapter'
import PostgresAdapter from './Adapters/PostgresAdapter'
import CassandraClient from './Clients/CassandraClient'
import type { ClientStatic } from './Clients/Client'
import type Migration from './Migrations/Migration'
// @ts-ignore
interface Config {
/**
* the main client is responsible for the Migration system
*/
mainClient: ClientStatic
/**
* define every models of the application
*/
models: Record<string, Dao>
/**
* Define the application migrations
*/
migrations: Array<Migration>
}
const config = {
/**
* the main client is responsible for the Migration system
*/
mainClient: CassandraClient as ClientStatic<CassandraClient>,
/**
* define every models of the application
*/
models: {
session: new PostgresAdapter(new Schema({}), 'pouet')
// session: new Dao(Session, new CassandraAdapter(Session, 'Session', 'id')),
},
/**
* Define the application migrations
*/
migrations: [
// Migration20240326115528
]
} as const
export default config