mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
@@ -1,21 +1,24 @@
|
||||
import { Global, Injectable, Module } from '@nestjs/common';
|
||||
|
||||
import { FeatureModel } from './feature';
|
||||
import { SessionModel } from './session';
|
||||
import { UserModel } from './user';
|
||||
import { VerificationTokenModel } from './verification-token';
|
||||
|
||||
export * from './session';
|
||||
export * from './user';
|
||||
export * from './verification-token';
|
||||
|
||||
const models = [UserModel, SessionModel, VerificationTokenModel] as const;
|
||||
const models = [
|
||||
UserModel,
|
||||
SessionModel,
|
||||
VerificationTokenModel,
|
||||
FeatureModel,
|
||||
] as const;
|
||||
|
||||
@Injectable()
|
||||
export class Models {
|
||||
constructor(
|
||||
public readonly user: UserModel,
|
||||
public readonly session: SessionModel,
|
||||
public readonly verificationToken: VerificationTokenModel
|
||||
public readonly verificationToken: VerificationTokenModel,
|
||||
public readonly feature: FeatureModel
|
||||
) {}
|
||||
}
|
||||
|
||||
@@ -25,3 +28,8 @@ export class Models {
|
||||
exports: [Models],
|
||||
})
|
||||
export class ModelModules {}
|
||||
|
||||
export * from './feature';
|
||||
export * from './session';
|
||||
export * from './user';
|
||||
export * from './verification-token';
|
||||
|
||||
Reference in New Issue
Block a user