parkernilson / cure-eat-2

1 stars 0 forks source link

Organize pocketbase interfaces #22

Closed parkernilson closed 9 months ago

parkernilson commented 9 months ago

There should be essentially three different "flavors" for each structure:

NOTE: should we use the stable interface or the raw interface for setters?

I think that we should use the stable interfaces in the getters and setters so that the apis are more stable, even though this will require us to do some mapping for set operations. We should also set relations on data types with dedicated setters (e.g. setProduct will set the product on the list_item, instead of using an update(list_item, { product: '...' }) since this would couple the data layer to the persistence layer.)

parkernilson commented 9 months ago

I decided to implement this with update operations using the Raw interfaces because this allows for a much more ergonomic usage.