aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ApartmentManager/HousingWebApi/Models/Defect.cs')
-rw-r--r--ApartmentManager/HousingWebApi/Models/Defect.cs39
1 files changed, 18 insertions, 21 deletions
diff --git a/ApartmentManager/HousingWebApi/Models/Defect.cs b/ApartmentManager/HousingWebApi/Models/Defect.cs
index b439078..5200124 100644
--- a/ApartmentManager/HousingWebApi/Models/Defect.cs
+++ b/ApartmentManager/HousingWebApi/Models/Defect.cs
@@ -6,41 +6,38 @@ namespace HousingWebApi
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.Spatial;
+ [Table("Defect")]
public partial class Defect
{
- [Key]
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+ public Defect()
+ {
+ DefectComments = new HashSet<DefectComment>();
+ DefectPictures = new HashSet<DefectPicture>();
+ }
+
[DatabaseGenerated(DatabaseGeneratedOption.None)]
- public int DefectNumber { get; set; }
+ public int DefectId { get; set; }
- public int ApartmentNr { get; set; }
+ public int ApartmentId { get; set; }
- [Required]
[StringLength(50)]
public string Name { get; set; }
[Column(TypeName = "date")]
- public DateTime DateUploaded { get; set; }
-
- [Required]
- [StringLength(200)]
- public string Picture { get; set; }
-
- [StringLength(200)]
- public string Picture2 { get; set; }
-
- [StringLength(200)]
- public string Picture3 { get; set; }
+ public DateTime? UploadDate { get; set; }
- [Column(TypeName = "text")]
- [Required]
public string Description { get; set; }
- [Column(TypeName = "text")]
- public string Comment { get; set; }
-
- [StringLength(10)]
+ [StringLength(50)]
public string Status { get; set; }
public virtual Apartment Apartment { get; set; }
+
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+ public virtual ICollection<DefectComment> DefectComments { get; set; }
+
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+ public virtual ICollection<DefectPicture> DefectPictures { get; set; }
}
}