Skip to content

Commit

Permalink
feat(models): add models methods signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
notusertelken committed Sep 19, 2022
1 parent 6847a27 commit eefadc5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/domain/model/principal.model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Injectable } from '@nestjs/common';
import { Principal } from '../entities/principal.entity';
import { Role } from '../entities/role.entity';

@Injectable()
export class PrincipalModel {
principalsDb: Record<string, Principal>;
constructor() {}

create(roles: Role[]) {}
findById(id: string) {}
assignRoles(id: string, roles: Role[]) {}
}
13 changes: 13 additions & 0 deletions src/domain/model/role.model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Injectable } from '@nestjs/common';
import { Role } from '../entities/role.entity';
import { Scope } from '../entities/scope.entity';

@Injectable()
export class RoleModel {
rolesDb: Record<string, Role>;
constructor() {}

create(scopes: Scope[]) {}
findById(id: string) {}
update(id: string, roles: Role[]) {}
}
12 changes: 12 additions & 0 deletions src/domain/model/scope.model.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Injectable } from '@nestjs/common';
import { Scope } from '../entities/scope.entity';

@Injectable()
export class RoleModel {
scopesDb: Record<string, Scope>;
constructor() {}

create(urn: string, context: string) {}
findById(id: string) {}
update(id: string, urn: string, context: string) {}
}

0 comments on commit eefadc5

Please sign in to comment.