Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- User:
- actAs: { Timestampable: ~ }
- columns:
- name: { type: string(64), notnull: true }
- email: { type: string(64), notnull: true }
- sex: { type: string(16), notnull: false }
- Login:
- actAs: { Timestampable: ~ }
- columns:
- username: { type: string(255), notnull: true }
- password: { type: string(255), notnull: true }
- user_id: { type: integer, notnull: true }
- relations:
- User: { class: User, onDelete: CASCADE, local: user_id, foreign: id, foreignAlias: Login }
- Submission:
- actAs: { Timestampable: ~ }
- columns:
- user_id: { type: integer, notnull: true }
- comment: { type: string(16000), notnull: true }
- accept_agreement: { type: boolean, notnull: true }
- questionaire_id: { type: integer, notnull: true }
- first_question_id: { type: integer, notnull: true }
- current_question_id: { type: integer, notnull: false }
- relations:
- Questionaire: { class: Questionaire, onDelete: CASCADE, local: questionaire_id, foreign: id, foreignAlias: Questionaires }
- FirstQuestion: { class: QuestionOrder, onDelete: CASCADE, local: first_question_id, foreign: id, foreignAlias: X0 }
- CurrentQuestion: { class: QuestionOrder, onDelete: CASCADE, local: current_question_id, foreign: id, foreignAlias: X1 }
- Questionaire:
- actAs: { Timestampable: ~ }
- columns:
- name: { type: string(64), notnull: true }
- text: { type: string(16000), notnull: true }
- Question:
- actAs: { Timestampable: ~ }
- columns:
- text: { type: string(16000), notnull: true }
- type: { type: string(16), notnull: true }
- questionaire_id: { type: integer, notnull: true }
- relations:
- Questionaire: { class: Questionaire, onDelete: CASCADE, local: questionaire_id, foreign: id, foreignAlias: Questions }
- QuestionOption:
- actAs: { Timestampable: ~ }
- columns:
- text: { type: string(255), notnull: true }
- question_id: { type: integer, notnull: true }
- relations:
- Question: { class: Question, onDelete: CASCADE, local: question_id, foreign: id, foreignAlias: Options }
- QuestionAnswer:
- actAs: { Timestampable: ~ }
- columns:
- text: { type: string(255), notnull: false }
- question_id: { type: integer, notnull: true }
- submission_id: { type: integer, notnull: true }
- option_id: { type: integer, notnull: false }
- relations:
- Submission: { class: Submission, onDelete: CASCADE, local: submission_id, foreign: id, foreignAlias: Answers}
- Question: { class: Question, onDelete: CASCADE, local: question_id, foreign: id, foreignAlias: Answers}
- Option: { class: QuestionOption, onDelete: CASCADE, local: option_id, foreign: id, foreignAlias: Ansers}
- QuestionOrder:
- actAs: { Timestampable: ~ }
- columns:
- previous_question_id: { type: integer, notnull: false }
- next_question_id: { type: integer, notnull: false }
- question_id: { type: integer, notnull: true }
- answer_id: { type: integer, notnull: false }
- relations:
- PerviousQuestion: { class: QuestionOrder, onDelete: CASCADE, local: previous_question_id, foreign: id, foreignAlias: X4 }
- NextQuestion: {class: QuestionOrder, onDelete: CASCADE, local: next_question_id, foreign: id, foreignAlias: X5 }
- Question: { class: Question, onDelete: CASCADE, local: question_id, foreign: id, foreignAlias: Orders}
- Answer: { class: QuestionAnswer, onDelete: CASCADE, local: answer_id, foreign: id, foreignAlias: Order}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement