Copy from old Repository

This commit is contained in:
Santhosh S
2023-08-15 23:52:30 -04:00
parent 93ef278429
commit 4160c2300b
160 changed files with 8796 additions and 19 deletions

View File

@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class AggregateAnswer
{
public string? Answer { get; set; }
public int Counter { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class AggregateResult
{
public string RegionId { get; set; }
public AggregateAnswer Answers { get; set; }
}
}

View File

@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Answer
{
public int Id { get; set; }
public int QuestionId { get; set; }
public string? LocationId { get; set; }
public string AnswerText { get; set; }
public string? Comment { get; set; }
public int SurveyResponseId { get; set; }
public string? RegionId { get; set; }
// public string? Name { get; set; }
// public string? Abbreviation { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class AnswerData
{
public string RegionId { get; set; }
public string Name { get; set; }
public string Abbreviation { get; set; }
public List<AggregateAnswer> Answers { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class AnswerRequest
{
public int SurveyId { get; set; }
public string LocationId { get; set; }
public string EmployeeId { get; set; }
public List<QuestionRequest> Answers { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Attachment
{
public int Id { get; set; }
public string URI { get; set; }
public int ResponseId { get; set; }
public int? AnswerId { get; set; }
public bool IsDeleted { get; set; }
public Attachment(int answerId, string uri)
{
this.AnswerId = answerId;
this.URI = uri;
}
}
}

View File

@ -0,0 +1,20 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class AttachmentInfo
{
public int ResponseId { get; set; }
public List<AnswerInfo> Answers { get; set; }
}
public class AnswerInfo
{
public int AnswerId { get; set; }
public List<FileModel> postedFiles { get; set; }
}
public class FileModel
{
public int? AttachmentId { get; set; }
public string? FileName { get; set; }
public string? FileContent { get; set; }
public string? FileExtension { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Employee
{
public string Id { get; set; }
[StringLength(50)]
public string Name { get; set; }
public DateTime BirthDate { get; set; }
[StringLength(50)]
public string OfficePhoneNumber { get; set; }
[StringLength(50)]
public string Email { get; set; }
public bool IsActive { get; set; }
}
}

View File

@ -0,0 +1,11 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Location
{
public string Id { get; set; }
public string RegionId { get; set; }
public string Name { get; set; }
public string MaintenanceCenter { get; set; }
public string SchoolType { get; set; }
}
}

View File

@ -0,0 +1,24 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Question
{
public int Id { get; set; }
public List<QuestionsTranslation> Questions { get; set; }
//public int QuestionTypeID { get; set; }
public string TypeText { get; set; } = string.Empty;
public int QuestionNumber { get; set; }
public bool IsRequired { get; set; }
public bool Comment { get; set; }
public bool Key { get; set; }
public int? SurveyId { get; set; }
public string QuestionGroup { get; set; }
public int CategoryId { get; set; }
// public int? Survey_SurveyID { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class QuestionRequest
{
public int QuestionId { get; set; }
public string AnswerText { get; set; }
public string Comment { get; set; }
public List<FileModel> PostedFiles { get; set; } = new List<FileModel>();
}
}

View File

@ -0,0 +1,8 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class QuestionsTranslation
{
public string QuestionText { get; set; }
public string Language { get; set; } = "En";
}
}

View File

@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Region
{
public string Id { get; set; }
public string Name { get; set; }
public string Abbreviation { get; set; }
}
}

View File

@ -0,0 +1,10 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class ResultData
{
public List<AnswerData> Regions { get; set; }
}
}

View File

@ -0,0 +1,28 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Survey
{
[Key]
public int Id { get; set; }
[StringLength(100)]
public string Title { get; set; }
//[StringLength(1000)]
//public string Description { get; set; }
public bool IsEnabled { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
//public DateTime CreatedDate { get; set; }
//[StringLength(6)]
//public string EmployeeID { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class SurveyQuestions
{
public int CategoryId { get; set; }
public string CategoryName { get; set; }
public string CategoryImage { get; set; }
public List<Question> Questions { get; set; }
}
}

View File

@ -0,0 +1,28 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class SurveyResponse
{
[Key]
public int Id { get; set; }
[ForeignKey("Survey")]
public int SurveyId { get; set; }
[ForeignKey("Location")]
public string LocationId { get; set; }
[ForeignKey("Employee")]
public string EmployeeId { get; set; }
//public DateTime? CreatedDate { get; set; }
//[StringLength(50)]
//public string ClientDevice { get; set; }
//[StringLength(250)]
//public string KeyAnswerResult { get; set; }
}
}