aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'ApartmentManager/HousingWebApi-fix/Models/Resident.cs')
-rw-r--r--ApartmentManager/HousingWebApi-fix/Models/Resident.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/ApartmentManager/HousingWebApi-fix/Models/Resident.cs b/ApartmentManager/HousingWebApi-fix/Models/Resident.cs
new file mode 100644
index 0000000..00fc439
--- /dev/null
+++ b/ApartmentManager/HousingWebApi-fix/Models/Resident.cs
@@ -0,0 +1,42 @@
+namespace HousingWebApi
+{
+ using System;
+ using System.Collections.Generic;
+ using System.ComponentModel.DataAnnotations;
+ using System.ComponentModel.DataAnnotations.Schema;
+ using System.Data.Entity.Spatial;
+
+ public partial class Resident
+ {
+ [Key]
+ [Column(Order = 0)]
+ [DatabaseGenerated(DatabaseGeneratedOption.None)]
+ public int ResidentNr { get; set; }
+
+ [Key]
+ [Column(Order = 1)]
+ [DatabaseGenerated(DatabaseGeneratedOption.None)]
+ public int ApartmentNr { get; set; }
+
+ [Required]
+ [StringLength(20)]
+ public string FirstName { get; set; }
+
+ [Required]
+ [StringLength(20)]
+ public string LastName { get; set; }
+
+ [Column(TypeName = "date")]
+ public DateTime? BirthDate { get; set; }
+
+ public int? Phone { get; set; }
+
+ [StringLength(30)]
+ public string Email { get; set; }
+
+ [Column(TypeName = "image")]
+ public byte[] Picture { get; set; }
+
+ public virtual Apartment Apartment { get; set; }
+ }
+}