Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
intrn(manager): customize the model chain to user for consultation
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Sep 11, 2022
1 parent 5e7cccb commit c8984df
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion database/managers/consultation.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import type { Pipe } from "$/types/database"
import type { Serializable } from "$/types/general"
import type { ConsultationQueryParameters } from "$/types/query"
import type { ModelCtor, FindAndCountOptions, CreationAttributes } from "%/types/dependent"
import type { ConsultationResource, ConsultationAttributes } from "$/types/documents/consultation"
import type {
ModelCtor,
Model as BaseModel,
CreationAttributes,
FindAndCountOptions
} from "%/types/dependent"

import User from "%/models/user"
import Role from "%/models/role"
Expand Down Expand Up @@ -45,6 +50,13 @@ export default class extends BaseManager<
})
}

get modelChainToUser(): readonly ModelCtor<BaseModel>[] {
return [
ChatMessageActivity,
User
]
}

async createUsingResource(
details: ConsultationResource<"create">,
requesterID: number,
Expand Down

0 comments on commit c8984df

Please sign in to comment.