0% found this document useful (0 votes)
41 views1 page

Backend Class Diagram

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views1 page

Backend Class Diagram

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Product API ProductGet

<<interface>>
ProductGetInterface

+ getProducts(productData
+ getProducts(productData : : JSON) : Product[]
JSON) : Product[]
CategoryGetAll
<<interface>>
CategoryUpdateInterface Category API
ProductGetAll <<interface>>
+ updateCategory(categoryData:
ProductGetAllInterface JSON) : Category + getCategories(categoryData:
JSON) : Category[]
+ getAllProducts() :
+ getAllProducts() : Product[] Product[]

CategoryUpdate
<<interface>>
CategoryGetAllInterface

ProductUpdate + getCategories(categoryData:
ProductRouter <<interface>> + updateCategory(categoryData:
ProductUpdateInterface
JSON) : Category[]
JSON) : Category CategoryRouter
+ routeHandles : String[]
+ UpdateProduct(productData
+ UpdateProduct(productData : : JSON) : boolean + routeHandles : String[]
+ router() : Router
JSON) : boolean

CategoryAdd + router() : Router


<<interface>>
CategoryAddInterface

ProductAdd <<interface>> + addCategory(name:


ProductAddInterface
String) : Category + addCategory(name: String) :
Category
+ addProduct(productData:
+ addProduct() : Product JSON) : Product

CategoryRemove
<<interface>>
CategoryRemoveInterface

ProductRemove <<interface>>
ProductRemoveInterface + removeCategory (name:
String) : boolean + removeCategory (name: String)
+ removeProduct(id: Int) : : boolean
+ removeProduct(id: Int) : boolean boolean

Router

Our API is currently


Prisma
Database Client //Express Component

API ServerRouter

+ Routes: Router[]

UserAdd
<<interface>>

User API UserAddInterface

+ addUser(userData:
+ addUser(userData : JSON) : JSON) : User RouteHeaders
User
+ headers : String[]

+ setHeaders() : void
UserUpdate
<<interface>>
UserUpdateInterface

+ editUser(userData:
+ edituser (userData : Object) : JSON) : User
boolean App
<<interface>>
UserRouter
DatabaseConnector
+ PORT: Int
+ routeHandles : String[] + database: DatabaseConnector
+ routes : ServerRouter
UserAuthenticate + ConnectToDatabase(NODE_ENV) :
+ router() : Router <<interface>>
UserAuthInterface
+ listen(PORT : int) : void

+ AuthenticateUser(id:
+ AuthenticateUser(id: Int) : int) : boolean
boolean
Composed of
NODE_ENV

UserGet <<interface>>
UserGetInterface
+ DatabaseURL : String
Aggregate of
+ DevState : String
+ getUser(email: String)
: User
+ getUser(email: String) : User Depends

Implements

You might also like