aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcinzelent <marcin@zelent.net>2017-05-15 12:02:09 +0200
committermarcinzelent <marcin@zelent.net>2017-05-15 12:02:09 +0200
commit26bf84faf8aa6687d35e080d6ffd9b5ea72e65be (patch)
tree2648a49b82a00aa5821ad307152fb2115088361e /ApartmentManager/HousingWebApi/Models
parent3bf0ab63e1f6f7d20ebd5093b19337ef325f6777 (diff)
Fixed repo directories.
Diffstat (limited to 'ApartmentManager/HousingWebApi/Models')
-rw-r--r--ApartmentManager/HousingWebApi/Models/AllResident.cs15
-rw-r--r--ApartmentManager/HousingWebApi/Models/Apartment.cs45
-rw-r--r--ApartmentManager/HousingWebApi/Models/ApartmentResident.cs37
-rw-r--r--ApartmentManager/HousingWebApi/Models/Defect.cs46
-rw-r--r--ApartmentManager/HousingWebApi/Models/PastContractOwner.cs17
-rw-r--r--ApartmentManager/HousingWebApi/Models/Resident.cs37
-rw-r--r--ApartmentManager/HousingWebApi/Models/ResidentList.cs20
-rw-r--r--ApartmentManager/HousingWebApi/Models/User.cs64
-rw-r--r--ApartmentManager/HousingWebApi/Models/database_firewall_rules.cs38
9 files changed, 319 insertions, 0 deletions
diff --git a/ApartmentManager/HousingWebApi/Models/AllResident.cs b/ApartmentManager/HousingWebApi/Models/AllResident.cs
new file mode 100644
index 0000000..655ee84
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/AllResident.cs
@@ -0,0 +1,15 @@
+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 AllResident
+ {
+ [Key]
+ [StringLength(20)]
+ public string FirstName { get; set; }
+ }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/Apartment.cs b/ApartmentManager/HousingWebApi/Models/Apartment.cs
new file mode 100644
index 0000000..7481344
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/Apartment.cs
@@ -0,0 +1,45 @@
+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 Apartment
+ {
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
+ public Apartment()
+ {
+ Defects = new HashSet<Defect>();
+ Residents = new HashSet<Resident>();
+ }
+
+ [Key]
+ [DatabaseGenerated(DatabaseGeneratedOption.None)]
+ public int ApartmentNumber { get; set; }
+
+ public decimal Size { get; set; }
+
+ public int NumberOfRooms { get; set; }
+
+ [StringLength(10)]
+ public string MonthlyCharge { get; set; }
+
+ public int? Floor { get; set; }
+
+ [StringLength(50)]
+ public string Address { get; set; }
+
+ [StringLength(200)]
+ public string PlanPicture { get; set; }
+
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+ public virtual ICollection<Defect> Defects { get; set; }
+
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
+ public virtual ICollection<Resident> Residents { get; set; }
+
+ public virtual User User { get; set; }
+ }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/ApartmentResident.cs b/ApartmentManager/HousingWebApi/Models/ApartmentResident.cs
new file mode 100644
index 0000000..092c95f
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/ApartmentResident.cs
@@ -0,0 +1,37 @@
+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 ApartmentResident
+ {
+ [Key]
+ [Column(Order = 0)]
+ [DatabaseGenerated(DatabaseGeneratedOption.None)]
+ public int ApartmentNumber { get; set; }
+
+ [Key]
+ [Column(Order = 1)]
+ [StringLength(20)]
+ public string FirstName { get; set; }
+
+ [Key]
+ [Column(Order = 2)]
+ [StringLength(20)]
+ public string LastName { get; set; }
+
+ [Column(TypeName = "date")]
+ public DateTime? BirthDate { get; set; }
+
+ public int? PhoneNo { get; set; }
+
+ [StringLength(30)]
+ public string Email { get; set; }
+
+ [Column(TypeName = "image")]
+ public byte[] Picture { get; set; }
+ }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/Defect.cs b/ApartmentManager/HousingWebApi/Models/Defect.cs
new file mode 100644
index 0000000..b439078
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/Defect.cs
@@ -0,0 +1,46 @@
+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 Defect
+ {
+ [Key]
+ [DatabaseGenerated(DatabaseGeneratedOption.None)]
+ public int DefectNumber { get; set; }
+
+ public int ApartmentNr { 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; }
+
+ [Column(TypeName = "text")]
+ [Required]
+ public string Description { get; set; }
+
+ [Column(TypeName = "text")]
+ public string Comment { get; set; }
+
+ [StringLength(10)]
+ public string Status { get; set; }
+
+ public virtual Apartment Apartment { get; set; }
+ }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/PastContractOwner.cs b/ApartmentManager/HousingWebApi/Models/PastContractOwner.cs
new file mode 100644
index 0000000..273952a
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/PastContractOwner.cs
@@ -0,0 +1,17 @@
+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 PastContractOwner
+ {
+ [DatabaseGenerated(DatabaseGeneratedOption.None)]
+ public int Id { get; set; }
+
+ [StringLength(10)]
+ public string ApartmentNr { get; set; }
+ }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/Resident.cs b/ApartmentManager/HousingWebApi/Models/Resident.cs
new file mode 100644
index 0000000..319a697
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/Resident.cs
@@ -0,0 +1,37 @@
+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]
+ public int ResidentNr { get; set; }
+
+ 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; }
+
+ [StringLength(220)]
+ public string Picture { get; set; }
+
+ public virtual Apartment Apartment { get; set; }
+ }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/ResidentList.cs b/ApartmentManager/HousingWebApi/Models/ResidentList.cs
new file mode 100644
index 0000000..9423bc1
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/ResidentList.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace HousingWebApi
+{
+ public class ResidentList
+ {
+ public int ResidentNr { get; set; }
+ public int ApartmentNr { get; set; }
+ public string FirstName { get; set; }
+ public string LastName { get; set; }
+ public DateTime? BirthDate { get; set; }
+ public int? Phone { get; set; }
+ public string Email { get; set; }
+ public string Picture { get; set; }
+
+ }
+} \ No newline at end of file
diff --git a/ApartmentManager/HousingWebApi/Models/User.cs b/ApartmentManager/HousingWebApi/Models/User.cs
new file mode 100644
index 0000000..e260ede
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/User.cs
@@ -0,0 +1,64 @@
+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 User
+ {
+ [Key]
+ [DatabaseGenerated(DatabaseGeneratedOption.None)]
+ public int ApartmentNr { get; set; }
+
+ [Required]
+ [StringLength(15)]
+ public string Username { get; set; }
+
+ [Required]
+ [StringLength(15)]
+ public string Password { get; set; }
+
+ [Required]
+ [StringLength(1)]
+ public string Type { 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; }
+
+ [StringLength(12)]
+ public string Phone { get; set; }
+
+ [StringLength(30)]
+ public string Email { get; set; }
+
+ [Column(TypeName = "image")]
+ public byte[] Picture { get; set; }
+
+ [StringLength(20)]
+ public string SecondName { get; set; }
+
+ [StringLength(20)]
+ public string SecondLastName { get; set; }
+
+ [Column(TypeName = "date")]
+ public DateTime? SecondBirthDate { get; set; }
+
+ [StringLength(12)]
+ public string SecondPhone { get; set; }
+
+ [StringLength(30)]
+ public string SecondEmail { get; set; }
+
+ public virtual Apartment Apartment { get; set; }
+ }
+}
diff --git a/ApartmentManager/HousingWebApi/Models/database_firewall_rules.cs b/ApartmentManager/HousingWebApi/Models/database_firewall_rules.cs
new file mode 100644
index 0000000..3b5d6a5
--- /dev/null
+++ b/ApartmentManager/HousingWebApi/Models/database_firewall_rules.cs
@@ -0,0 +1,38 @@
+namespace HousingWebApi
+{
+ using System;
+ using System.Collections.Generic;
+ using System.ComponentModel.DataAnnotations;
+ using System.ComponentModel.DataAnnotations.Schema;
+ using System.Data.Entity.Spatial;
+
+ [Table("sys.database_firewall_rules")]
+ public partial class database_firewall_rules
+ {
+ [Key]
+ [Column(Order = 0)]
+ public int id { get; set; }
+
+ [Key]
+ [Column(Order = 1)]
+ public string name { get; set; }
+
+ [Key]
+ [Column(Order = 2)]
+ [StringLength(45)]
+ public string start_ip_address { get; set; }
+
+ [Key]
+ [Column(Order = 3)]
+ [StringLength(45)]
+ public string end_ip_address { get; set; }
+
+ [Key]
+ [Column(Order = 4)]
+ public DateTime create_date { get; set; }
+
+ [Key]
+ [Column(Order = 5)]
+ public DateTime modify_date { get; set; }
+ }
+}