Implementation logical database scheme - #17
Conversation
….com/SELab-2/Dwengo-2 into 14-implement-logical-database-scheme
….com/SELab-2/Dwengo-2 into 14-implement-logical-database-scheme
|
Insight: the way i initialize the database in |
|
First thing that comes to my mind is: why does he want to push to |
Consistency is key to great code
| } | ||
|
|
||
| @Entity() | ||
| export class Invites { |
There was a problem hiding this comment.
Wouldn't it be better to rename this to Invite? I know this might be a bit of a detail, but I feel like that name would suit better the purpose of this entity
There was a problem hiding this comment.
Zou de naam voor deze tabel niet beter iets zoals PendingJoinRequests zijn? Aangezien het nu eigenlijk de zender van de invite is die de geïnviteerde moet accepteren, en niet omgekeerd zoals je zou verwachten bij invites.
| email!: string | ||
|
|
||
| @Column({ type: "varchar", length: 50 }) | ||
| forename!: string |
There was a problem hiding this comment.
forename veld naar first_name hernoemen?
| @JoinColumn({ name: "student_id" }) | ||
| student!: Student | ||
|
|
||
| @OneToOne(() => QuestionThread) |
There was a problem hiding this comment.
Should be able to be null if there isn't a thread yet? Same for answer.
Maybe with:
@OneToOne(() => AssignmentAnswer, { nullable: true })But this might not be supported by PostgreSQL
|
Applied the comments from the reviews and also did some of the small todo's mentioned above. Big change: the classes i defined previously are now in The clean-architecture way of working says we need to define general data entities (example in Ofcourse when we write queries with TypeORM we will need to map the TypeORM data models to entities as said in this article (under "Mapping"). Can @thomasdejaeghere and @bramcomyn check that this is indeed the case? |
There was a problem hiding this comment.
I would change the name of this Interface to ITeacher to avoid long class names in the future.
This is indeed true, In my last push to branch 11 I already set up the needed files for the Student entity, connection with the database then needs to implemented in UserRepositoryImpl.ts in /backend/src/infrastructure/repositories. Code looks good! I will merge this branch into dev. |
First draft of the implementation of the logical database scheme. There are some changes needed to the presented database scheme in #2 .
Things yet to do: