refactor(common): Teacher
This commit is contained in:
parent
3b51b0f1f6
commit
6ff29cb949
7 changed files with 28 additions and 24 deletions
|
@ -1,14 +1,7 @@
|
|||
import { TeacherInvitation } from '../entities/classes/teacher-invitation.entity.js';
|
||||
import { mapToClassDTO } from './class.js';
|
||||
import { mapToUserDTO } from './user.js';
|
||||
import { ClassDTO } from 'dwengo-1-common/src/interfaces/class';
|
||||
import { UserDTO } from 'dwengo-1-common/src/interfaces/user';
|
||||
|
||||
export interface TeacherInvitationDTO {
|
||||
sender: string | UserDTO;
|
||||
receiver: string | UserDTO;
|
||||
class: string | ClassDTO;
|
||||
}
|
||||
import { TeacherInvitationDTO } from 'dwengo-1-common/src/interfaces/teacher-invitation';
|
||||
|
||||
export function mapToTeacherInvitationDTO(invitation: TeacherInvitation): TeacherInvitationDTO {
|
||||
return {
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
import { Teacher } from '../entities/users/teacher.entity.js';
|
||||
import { getTeacherRepository } from '../data/repositories.js';
|
||||
|
||||
export interface TeacherDTO {
|
||||
id: string;
|
||||
username: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
endpoints?: {
|
||||
classes: string;
|
||||
questions: string;
|
||||
invitations: string;
|
||||
groups: string;
|
||||
};
|
||||
}
|
||||
import { TeacherDTO } from 'dwengo-1-common/src/interfaces/teacher';
|
||||
|
||||
export function mapToTeacherDTO(teacher: Teacher): TeacherDTO {
|
||||
return {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue