Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Article Module, Entity and Service #27

Closed
LamboCreeper opened this issue May 30, 2022 · 1 comment · Fixed by #32
Closed

Article Module, Entity and Service #27

LamboCreeper opened this issue May 30, 2022 · 1 comment · Fixed by #32
Assignees
Labels
accepted The issue is accepted and PRs are welcome enhancement New feature or request
Milestone

Comments

@LamboCreeper
Copy link
Member

LamboCreeper commented May 30, 2022

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:

  • 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)
  • A content field which is a string

You 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.

@LamboCreeper LamboCreeper added accepted The issue is accepted and PRs are welcome enhancement New feature or request labels May 30, 2022
@LamboCreeper LamboCreeper added this to the Articles milestone May 30, 2022
This was referenced May 30, 2022
@JonaVDM
Copy link
Contributor

JonaVDM commented Jun 2, 2022

🍉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted The issue is accepted and PRs are welcome enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants