Skip to content

Make Room a model #544

@D0gmaDev

Description

@D0gmaDev

Having rooms only as string in the user model makes a room having a proper identity and checks unnecessarily difficult (does the room exist ? should it be uppercase or lowercase ?, is CLAP in Building C ?), when they are in fact relevant objects of our modelisation. We shall maintain anyway a list of existing rooms to avoid assigning non-existant rooms (or to list unused rooms), so rooms might as well be a db table, with little to no downsides.

Even better : we can keep the room number (for instance A101A) as the foreign key we use in the user model instead of the current string, so there is absolutely no change, so in particular no decrease in readability/perfs in the user table.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions