feat(backend): Assignment-, Group- en SubmissionRepository aangemaakt
This commit is contained in:
		
							parent
							
								
									bd93e5fae3
								
							
						
					
					
						commit
						2837618fd5
					
				
					 8 changed files with 75 additions and 4 deletions
				
			
		|  | @ -4,7 +4,7 @@ import {Entity, Enum, ManyToOne, PrimaryKey, Property} from "@mikro-orm/core"; | |||
| import {Language} from "../content/language"; | ||||
| 
 | ||||
| @Entity() | ||||
| export class Submission<T> { | ||||
| export class Submission { | ||||
|     @PrimaryKey({type: "string"}) | ||||
|     learningObjectHruid!: string; | ||||
| 
 | ||||
|  | @ -14,7 +14,7 @@ export class Submission<T> { | |||
|     @PrimaryKey({type: "string"}) | ||||
|     learningObjectVersion: string = "1"; | ||||
| 
 | ||||
|     @Property({type: "integer"}) | ||||
|     @PrimaryKey({type: "integer"}) | ||||
|     submissionNumber!: number; | ||||
| 
 | ||||
|     @ManyToOne({entity: () => Student}) | ||||
|  | @ -27,5 +27,5 @@ export class Submission<T> { | |||
|     onBehalfOf?: Group; | ||||
| 
 | ||||
|     @Property({type: "json"}) | ||||
|     content!: T; | ||||
|     content!: string; | ||||
| } | ||||
|  | @ -0,0 +1,7 @@ | |||
| import {Language} from "./language"; | ||||
| 
 | ||||
| export class LearningObjectIdentifier { | ||||
|     constructor(public hruid: string, public language: Language, public version: string) { | ||||
| 
 | ||||
|     } | ||||
| } | ||||
|  | @ -1,7 +1,7 @@ | |||
| import {User} from "./user.entity"; | ||||
| import {Collection, Entity, ManyToMany} from '@mikro-orm/core'; | ||||
| import {Class} from "../classes/class.entity"; | ||||
| import {Group} from "../assigments/group.entity"; | ||||
| import {Group} from "../assignments/group.entity"; | ||||
| import {StudentRepository} from "../../data/users/student-repository"; | ||||
| 
 | ||||
| @Entity({repository: () => StudentRepository}) | ||||
|  |  | |||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger