isaac238 / ITSE_GROUP

Repo for our introduction to software engineering module gym administration project
https://itse.isaac238.dev
2 stars 0 forks source link

Backend Refactor #44

Closed isaac238 closed 11 months ago

isaac238 commented 12 months ago

Backend Refactor

Refactor the backend to coincide with MVC using the:

Some example models could be,

Member:

Auth:

Pin:

Static vs Instance

A static object would require passing in the pocketbase instance for the current request using a arg such as

Pin.create(pb, {dob});

while an instance class would require the pb instance to be passed into the constructor before any of the methods can be used e.g.

const pin = new Pin(locals.pb);
pin.Create({dob});