enabled seed data and changed survey Response project name

This commit is contained in:
uppuv
2023-10-04 15:03:59 -04:00
parent 044876b23b
commit 54d6fab64f
55 changed files with 92 additions and 118 deletions

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 int LocationId { get; set; }
public string AnswerText { get; set; }
public string Comment { get; set; }
public int SurveyResponseId { get; set; }
public int RegionId { get; set; }
// public string? Name { get; set; }
// public string? Abbreviation { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class AnswerRequest
{
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,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,16 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Employee
{
public int Id { get; set; }
public string EmployeeCode { get; set; }
public string Name { get; set; }
public DateTime BirthDate { get; set; }
public string OfficePhoneNumber { get; set; }
public string Email { get; set; }
public bool IsActive { get; set; }
public string? PreferredLanguage { get; set; }
}
}

View File

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

View File

@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Question
{
public int Id { get; set; }
public string TypeText { get; set; }
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 int CategoryId { get; set; }
public Dictionary<string, string> Text { get; set; }
}
}

View File

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

View File

@ -0,0 +1,15 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Request
{
public int SurveyId { get; set; }
public int LocationId { get; set; }
public int EmployeeId { get; set; }
public string? ClientDevice { get; set; }
public string? KeyAnswerResult { get; set; }
public double? Longitute { get; set; }
public double? Latitude { get; set; }
public DateTime? CreatedDate { get; set; } = DateTime.Now;
public List<AnswerRequest> Answers { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class Survey
{
public int Id { get; set; }
public bool IsEnabled { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public DateTime CreatedDate { get; set; }
public Dictionary<string, string> Titles { 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,18 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class SurveyResponse
{
public int Id { get; set; }
public int SurveyId { get; set; }
public int LocationId { get; set; }
public int EmployeeId { get; set; }
public DateTime CreatedDate { get; set; }
public string ClientDevice { get; set; }
public string KeyAnswerResult { get; set; }
public double Longitute { get; set; }
public double Latitude { get; set; }
}
}

View File

@ -0,0 +1,13 @@
namespace DamageAssesment.Api.SurveyResponses.Models
{
public class SurveyTranslation
{
public string Title { get; set; }
public string Language { get; set; }
}
}