Skip to content

Commit

Permalink
add new model in graphql for general mandate
Browse files Browse the repository at this point in the history
  • Loading branch information
GunnlaugurG committed Sep 17, 2024
1 parent 602186e commit 0f09a68
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion libs/api/domains/auth/src/lib/models/delegation.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@ const exhaustiveCheck = (param: never) => {
resolveType(delegation: Delegation) {
switch (delegation.type) {
case AuthDelegationType.LegalGuardian:
case AuthDelegationType.GeneralMandate:
return LegalGuardianDelegation
case AuthDelegationType.ProcurationHolder:
return ProcuringHolderDelegation
case AuthDelegationType.PersonalRepresentative:
return PersonalRepresentativeDelegation
case AuthDelegationType.Custom:
return CustomDelegation
case AuthDelegationType.GeneralMandate:
return GeneralMandate
case AuthDelegationType.LegalRepresentative:
return LegalRepresentativeDelegation
default:
Expand Down Expand Up @@ -72,6 +73,14 @@ export class ProcuringHolderDelegation extends Delegation {}
})
export class PersonalRepresentativeDelegation extends Delegation {}

@ObjectType('AuthGeneralMandate', {
implements: Delegation,
})
export class GeneralMandate extends Delegation {
@Field(() => Date, { nullable: true })
validTo?: Date
}

@ObjectType('AuthCustomDelegation', {
implements: Delegation,
})
Expand Down

0 comments on commit 0f09a68

Please sign in to comment.