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
{{ message }}
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.
To start our work on supporting articles we need a new article module that houses an article entity and article service. The article service should include the ability to:
Get one specific article by ID
Get all articles
Create a new article
Update an article by ID
An article entity should have:
An auto-incrementing, unique and primary key id field (e.g. 1)
A created field which contains the date at which the entity was created
A modified field which's value updates each time the entity is modified
A user field which's value is equal to the ID of the user who created the article
In the entity, we should join the article and user tables together so that it contains a full copy of the user
A title field which's value is a string which is the title of the article
A slug field which's value is a unique string which is the path to the article
A status field which's value is an enum of APPROVED, PENDING, REJECTED (default of PENDING)
A description field which is a string (max length of 250 characters)
What Functionality Are You Suggesting?
To start our work on supporting articles we need a new article module that houses an article entity and article service. The article service should include the ability to:
An article entity should have:
id
field (e.g.1
)created
field which contains the date at which the entity was createdmodified
field which's value updates each time the entity is modifieduser
field which's value is equal to the ID of the user who created the articlearticle
anduser
tables together so that it contains a full copy of the usertitle
field which's value is a string which is the title of the articleslug
field which's value is a unique string which is the path to the articlestatus
field which's value is an enum ofAPPROVED
,PENDING
,REJECTED
(default ofPENDING
)description
field which is a string (max length of 250 characters)content
field which is a stringYou can use the
@CreateDateColumn()
and@UpdatedDateColumn()
decorators to automatically handle the dates.Why Will This Benefit The Community?
This will allow us to create and retrieve articles throughout the API, therefore unlocking the ability to serve them across the web and Discord.
The text was updated successfully, but these errors were encountered: