aboutsummaryrefslogtreecommitdiffstats
path: root/code/api/src/Models/Database/Customer
diff options
context:
space:
mode:
Diffstat (limited to 'code/api/src/Models/Database/Customer')
-rw-r--r--code/api/src/Models/Database/Customer/Customer.cs29
-rw-r--r--code/api/src/Models/Database/Customer/CustomerContact.cs12
-rw-r--r--code/api/src/Models/Database/Customer/CustomerEvent.cs8
-rw-r--r--code/api/src/Models/Database/Customer/CustomerGroup.cs7
-rw-r--r--code/api/src/Models/Database/Customer/CustomerGroupMembership.cs7
5 files changed, 63 insertions, 0 deletions
diff --git a/code/api/src/Models/Database/Customer/Customer.cs b/code/api/src/Models/Database/Customer/Customer.cs
new file mode 100644
index 0000000..8e153c6
--- /dev/null
+++ b/code/api/src/Models/Database/Customer/Customer.cs
@@ -0,0 +1,29 @@
+namespace IOL.GreatOffice.Api.Data.Database;
+
+public class Customer : BaseWithOwner
+{
+ public Customer() { }
+ public Customer(LoggedInUserModel loggedInUserModel) : base(loggedInUserModel) { }
+
+ public string CustomerNumber { get; set; }
+ public string Name { get; set; }
+ public string Description { get; set; }
+ public string Address1 { get; set; }
+ public string Address2 { get; set; }
+ public string PostalCode { get; set; }
+ public string PostalCity { get; set; }
+ public string Country { get; set; }
+ public string Phone { get; set; }
+ public string Email { get; set; }
+ public string VATNumber { get; set; }
+ public string ORGNumber { get; set; }
+ public string DefaultReference { get; set; }
+ public string Website { get; set; }
+ public string Currency { get; set; }
+ public Guid? OwnerId { get; set; }
+ public User Owner { get; set; }
+ public ICollection<CustomerGroup> Groups { get; set; }
+ public ICollection<CustomerContact> Contacts { get; set; }
+ public ICollection<CustomerEvent> Events { get; set; }
+ public ICollection<Project> Projects { get; set; }
+} \ No newline at end of file
diff --git a/code/api/src/Models/Database/Customer/CustomerContact.cs b/code/api/src/Models/Database/Customer/CustomerContact.cs
new file mode 100644
index 0000000..f5a951d
--- /dev/null
+++ b/code/api/src/Models/Database/Customer/CustomerContact.cs
@@ -0,0 +1,12 @@
+namespace IOL.GreatOffice.Api.Data.Database;
+
+public class CustomerContact : BaseWithOwner
+{
+ public Customer Customer { get; set; }
+ public string FirstName { get; set; }
+ public string LastName { get; set; }
+ public string Email { get; set; }
+ public string Phone { get; set; }
+ public string WorkTitle { get; set; }
+ public string Note { get; set; }
+}
diff --git a/code/api/src/Models/Database/Customer/CustomerEvent.cs b/code/api/src/Models/Database/Customer/CustomerEvent.cs
new file mode 100644
index 0000000..a87da4c
--- /dev/null
+++ b/code/api/src/Models/Database/Customer/CustomerEvent.cs
@@ -0,0 +1,8 @@
+namespace IOL.GreatOffice.Api.Data.Database;
+
+public class CustomerEvent : BaseWithOwner
+{
+ public Customer Customer { get; set; }
+ public string Title { get; set; }
+ public string Note { get; set; }
+}
diff --git a/code/api/src/Models/Database/Customer/CustomerGroup.cs b/code/api/src/Models/Database/Customer/CustomerGroup.cs
new file mode 100644
index 0000000..9438f3c
--- /dev/null
+++ b/code/api/src/Models/Database/Customer/CustomerGroup.cs
@@ -0,0 +1,7 @@
+namespace IOL.GreatOffice.Api.Data.Database;
+
+public class CustomerGroup : BaseWithOwner
+{
+ public string Name { get; set; }
+ public ICollection<Customer> Customers { get; set; }
+} \ No newline at end of file
diff --git a/code/api/src/Models/Database/Customer/CustomerGroupMembership.cs b/code/api/src/Models/Database/Customer/CustomerGroupMembership.cs
new file mode 100644
index 0000000..ec0d4af
--- /dev/null
+++ b/code/api/src/Models/Database/Customer/CustomerGroupMembership.cs
@@ -0,0 +1,7 @@
+namespace IOL.GreatOffice.Api.Data.Database;
+
+public class CustomerGroupMembership : Base
+{
+ public Customer Customer { get; set; }
+ public CustomerGroup Group { get; set; }
+} \ No newline at end of file