Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

An authenticated user can post an answer to a question #31

Closed
@josepostiga

Description

@josepostiga

Scenario

Given I'm an authenticated user of any type
When I send a POST request to /discussions/questions/{questionId}/answers with the required input
I expect that answer to the given question to be stored

Database and schema information

A new question_answers table should be created with the following structure:

  • id: PK.
  • question_id: the related question internal identifier. Must be required and indexed.
  • author_id: FK, related to the user who created the answer. Must be required and indexed.
  • content: the answer itself. Must be required.
  • created_at: timestamp with timezone. Must be indexed and default to the date the resource is created.
  • updated_at: timestamp with timezone. Must be indexed.
  • deleted_at: timestamp with timezone. Must be indexed and default to null. This indicates if the resource was deleted.

Additional requirements

This builds on the features of #25, which introduces questions.

Metadata

Metadata

Assignees

Labels

storyNew feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions