- src
- controllers
- UserController.ts
- FormController.ts
- QuestionController.ts
- ResponseController.ts
- models
- User.ts
- Form.ts
- Question.ts
- Response.ts
- db
- db.ts
- mailers
- SignupMailer.ts
- SubmissionMailer.ts
- types
- CustomTypes.ts
- index.ts
- controllers
Created
May 18, 2023 07:33
-
-
Save PrimeTimeTran/489ceb03f001a5bd098967bab3fb276b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User { | |
id: string; | |
name: string; | |
email: string; | |
} | |
class Form { | |
id: string; | |
title: string; | |
questions: Question[]; | |
} | |
class Question { | |
id: string; | |
text: string; | |
type: QuestionType; | |
options?: string[]; | |
} | |
enum QuestionType { | |
Text = 'text', | |
MultipleChoice = 'multipleChoice', | |
Checkbox = 'checkbox', | |
} | |
class Response { | |
id: string; | |
formId: string; | |
userId: string; | |
answers: Answer[]; | |
} | |
class Answer { | |
questionId: string; | |
value: string | string[]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment