You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UUID referencing in the wallet and shop models should be replaced to be more generic yet still more identifying.
A single UUID reference does not, in some cases, achieve enough object identification, whereas if we mimic a generic foreign key relation we can instead identify an object with its type and UUID.
This can all be done without exposing any underlying model(for wallet and shop), hence we can better protect against eventual sidestepping of their API and unwanted usage/behaviour.
The text was updated successfully, but these errors were encountered:
As this field can be filled in with custom text (i.e. Swishinsättning), it would not be wise to enforce stronger generic referencing with ContentType, as sometimes the reference is not a database object.
However, this argument assumes that the reference for a transaction should always be an object stored somewhere in the database.
The question here would be: Should we represent a reference like Swishinsättning differently? Is it enough with a CharField?
IMO we should. In a couple of months, as soon Länsförsäkringar has released Swish för handel, we will be in need of storing more metadata about Swish payments and a CharField won't be enough. Feels like the most natural way of solving this is to store the metadata in a separate table.
UUID referencing in the wallet and shop models should be replaced to be more generic yet still more identifying.
A single UUID reference does not, in some cases, achieve enough object identification, whereas if we mimic a generic foreign key relation we can instead identify an object with its type and UUID.
This can all be done without exposing any underlying model(for wallet and shop), hence we can better protect against eventual sidestepping of their API and unwanted usage/behaviour.
The text was updated successfully, but these errors were encountered: