daily pastebin goal
26%
SHARE
TWEET

Untitled

a guest May 16th, 2018 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export class Entity {
  2.     id: number
  3.     createdAt: Date
  4. }
  5.  
  6. export class Person extends Entity {
  7.     name: string
  8.     document: string
  9.     user: User
  10.    
  11.     constructor(name: string, document: string, user: User) {
  12.         this.name     = name
  13.         this.document = document
  14.         this.user     = user
  15.     }
  16. }
  17.  
  18. export class User extends Entity {
  19.     login: string
  20.     passwd: string
  21.     role: string
  22.    
  23.     constructor(login: string, passwd: string, role: string) {
  24.         this.login  = login
  25.         this.passwd = passwd
  26.         this.role.  = role
  27.     }
  28. }
  29.  
  30. export class Teacher extends Person {
  31.    
  32. }
  33.  
  34. export class Student extends Person {
  35.  
  36. }
  37.  
  38. export class Assignment extends Entity {
  39.     title: string
  40.     limitDate: Date
  41.     description: string
  42.     finishedAssignments: FinishedAssignments[]
  43. }
  44.  
  45. export class FinishedAssignment extends Entity {
  46.     assigment: Assignment
  47.     finishDate: Date
  48.     student: Student
  49.     content: string
  50. }
  51.  
  52. export class Subject extends Entity {
  53.     code: string
  54.     name: string
  55.     teacher: Teacher
  56. }
  57.  
  58. export class Material extends Entity {
  59.     title: string
  60.     content: string
  61. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top