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
				
			
		
							
								
								
									
										31
									
								
								backend/src/entities/assignments/submission.entity.ts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								backend/src/entities/assignments/submission.entity.ts
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,31 @@ | |||
| import {Student} from "../users/student.entity"; | ||||
| import {Group} from "./group.entity"; | ||||
| import {Entity, Enum, ManyToOne, PrimaryKey, Property} from "@mikro-orm/core"; | ||||
| import {Language} from "../content/language"; | ||||
| 
 | ||||
| @Entity() | ||||
| export class Submission { | ||||
|     @PrimaryKey({type: "string"}) | ||||
|     learningObjectHruid!: string; | ||||
| 
 | ||||
|     @Enum({items: () => Language, primary: true}) | ||||
|     learningObjectLanguage!: Language; | ||||
| 
 | ||||
|     @PrimaryKey({type: "string"}) | ||||
|     learningObjectVersion: string = "1"; | ||||
| 
 | ||||
|     @PrimaryKey({type: "integer"}) | ||||
|     submissionNumber!: number; | ||||
| 
 | ||||
|     @ManyToOne({entity: () => Student}) | ||||
|     submitter!: Student; | ||||
| 
 | ||||
|     @Property({type: "datetime"}) | ||||
|     submissionTime!: Date; | ||||
| 
 | ||||
|     @ManyToOne({entity: () => Group, nullable: true}) | ||||
|     onBehalfOf?: Group; | ||||
| 
 | ||||
|     @Property({type: "json"}) | ||||
|     content!: string; | ||||
| } | ||||
		Reference in a new issue
	
	 Gerald Schmittinger
						Gerald Schmittinger