Kyoso-Team / kyoso

A web application that takes osu! tournaments beyonds spreadsheets.
http://kyoso.sh
GNU Affero General Public License v3.0
1 stars 1 forks source link

Create form procedures #58

Open L-Mario564 opened 3 weeks ago

L-Mario564 commented 3 weeks ago

Why?

Admins must be able to create forms for public forms and tournament staff must be able to create forms for any tournament use they may see fit.

How?

For each procedure:

Create form

Insert a record into the Form table.

Input: anonymousResponses, title.

Conditions

Create tournament form

Insert a record into the TournamentForm table.

Input: anonymousResponses, title, type, target, tournamentId.

Conditions

Update form

Update the Form and/or TournamentForm record by Form.id.

Input: public, anonymousResponses, closeAt, title, description, thanksMessage, closedMessage, fields, target, tournamentId. (The last one must be defined if a tournament form is being updated).

Conditions

Delete form

Set the date of Form.deletedAt.

Input: formId, deletedAt, tournamentId. (The last one must be defined if a tournament form is being updated).

Conditions

Submit form response

Insert a record into the FormResponse table.

Input: fieldResponses, formId.

Conditions