Multi language dynamic object changes

This commit is contained in:
uppuv
2023-09-08 15:40:06 -04:00
parent 24a6e6513e
commit 4cf7d9f891
21 changed files with 370 additions and 283 deletions

View File

@ -0,0 +1,8 @@
namespace DamageAssesment.Api.Questions.Models
{
public class CategoryTranslation
{
public string Title { get; set; }
public string Language { get; set; }
}
}

View File

@ -2,11 +2,17 @@
namespace DamageAssesment.Api.Questions.Models
{
public class Question
public class MultiLanQuestion: BaseQuestion
{
public MultiLanguage Questions { get; set; }
}
public class Question: BaseQuestion
{
public List<QuestionsTranslation> Questions { get; set; }
}
public class BaseQuestion
{
public int Id { get; set; }
public List<QuestionsTranslation> Questions { get; set; }
//public int QuestionTypeID { get; set; }
public string TypeText { get; set; } = string.Empty;

View File

@ -1,9 +1,17 @@
namespace DamageAssesment.Api.Questions.Models
{
public class QuestionCategory
public class MultiLanQuestionCategory : BaseQuestionCategory
{
public object Titles { get; set; }
}
public class QuestionCategory : BaseQuestionCategory
{
public List<CategoryTranslation> Categories { get; set; }
}
public class BaseQuestionCategory
{
public int Id { get; set; }
public string CategoryName { get; set; }
public string CategoryImage { get; set; }
public string IconName { get; set; }
public string IconLibrary { get; set; }
}
}

View File

@ -5,4 +5,8 @@
public string QuestionText { get; set; }
public string Language { get; set; } = "En";
}
public class MultiLanguage
{
public object questionText { get; set; }
}
}

View File

@ -3,8 +3,8 @@
public class SurveyQuestions
{
public int CategoryId { get; set; }
public string CategoryName { get; set; }
public string CategoryImage { get; set; }
public List<Question> Questions { get; set; }
public string IconName { get; set; }
public string IconLibrary { get; set; }
public List<MultiLanQuestion> Questions { get; set; }
}
}