forked from MDCPS/DamageAssessment_Backend
Copy from old Repository
This commit is contained in:
@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace DamageAssesment.Api.Attachments.Db
|
||||
{
|
||||
public class Attachment
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public string URI { get; set; }
|
||||
[ForeignKey("Answer")]
|
||||
public int? AnswerId { get; set; }
|
||||
[ForeignKey("SurveyResponse")]
|
||||
public int ResponseId { get; set; }
|
||||
public bool IsDeleted { get; set; }
|
||||
public string FileName { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DamageAssesment.Api.Attachments.Db
|
||||
{
|
||||
public class AttachmentsDbContext:DbContext
|
||||
{
|
||||
public AttachmentsDbContext(DbContextOptions options) : base(options)
|
||||
{
|
||||
}
|
||||
public DbSet<Db.Attachment> Attachments { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user