using Dapper.Contrib.Extensions; namespace Quizzer.Models { /// /// Multiple Choice Question /// Missing: image upload /// CREATE TABLE `Questions` ( /// `QId` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, /// `Txt` VARCHAR(512) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci', /// PRIMARY KEY(`QId`) USING BTREE /// ) /// COMMENT='The headline' /// COLLATE='utf8mb4_general_ci' /// ENGINE=InnoDB /// AUTO_INCREMENT = 2 /// ; /// public class Question { [Key] public string QuestionID { get; set; } public string Category { get; set; } public string QuestionText { get; set; } public string QuestionType { get; set; } public string ContentJson { get; set; } public Question() { QuestionID = String.Empty; Category = String.Empty; QuestionText = String.Empty; QuestionType = String.Empty; ContentJson = String.Empty; } } public class MCQuestion : Question { public List AList { get; set; } public MCQuestion() { AList = new List(); } } public class Alternative { public string Atxt { get; set; } public bool Aok { get; set; } public int Counter { get; set; } public Alternative() { Counter = 0; Atxt = String.Empty; Aok = false; } } }