1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 |
|
---|
4 | namespace HeuristicLab.Services.Optimization.Billing.Model {
|
---|
5 | public class ContactInformation {
|
---|
6 | public long ContactInformationId { get; set; }
|
---|
7 | public string OrganizationName { get; set; }
|
---|
8 | public string Street { get; set; }
|
---|
9 | public string City { get; set; }
|
---|
10 | public string State { get; set; }
|
---|
11 | public string PostalCode { get; set; }
|
---|
12 | public string LastName { get; set; }
|
---|
13 | public string FirstName { get; set; }
|
---|
14 | public string Email { get; set; }
|
---|
15 | }
|
---|
16 |
|
---|
17 | public class PaymentInformation {
|
---|
18 | public long PaymentInformationId { get; set; }
|
---|
19 | public string CardNumber { get; set; }
|
---|
20 | public PaymentMethod PaymentMethod { get; set; }
|
---|
21 | public string AdditionalInformation { get; set; }
|
---|
22 | }
|
---|
23 |
|
---|
24 | public enum PaymentMethod {
|
---|
25 | Cheque,
|
---|
26 | Visa,
|
---|
27 | MasterCard,
|
---|
28 | PayPal,
|
---|
29 | Diners
|
---|
30 | }
|
---|
31 |
|
---|
32 | public enum BillingType {
|
---|
33 | Pre,
|
---|
34 | Post
|
---|
35 | }
|
---|
36 |
|
---|
37 | public enum BillingPeriod {
|
---|
38 | Weekly,
|
---|
39 | Monthly,
|
---|
40 | Yearly
|
---|
41 | }
|
---|
42 |
|
---|
43 | public class Product {
|
---|
44 | public long ProductId { get; set; }
|
---|
45 | public string Name { get; set; }
|
---|
46 | public string Description { get; set; }
|
---|
47 | public string ProductType { get; set; }
|
---|
48 | public double Price { get; set; }
|
---|
49 | }
|
---|
50 |
|
---|
51 | public class User {
|
---|
52 | public long UserId { get; set; }
|
---|
53 | public string Name { get; set; }
|
---|
54 | public virtual IList<PaymentInformation> PaymentInformation { get; set; }
|
---|
55 | }
|
---|
56 |
|
---|
57 | public enum OrderState {
|
---|
58 | Created,
|
---|
59 | Active,
|
---|
60 | Suspended,
|
---|
61 | Overdue,
|
---|
62 | Finished
|
---|
63 | }
|
---|
64 |
|
---|
65 | public class Order {
|
---|
66 | public long OrderId { get; set; }
|
---|
67 | public long UserId { get; set; }
|
---|
68 | public BillingType BillingType { get; set; }
|
---|
69 | public long OrderStateId { get; set; }
|
---|
70 | public BillingPeriod BillingPeriod { get; set; }
|
---|
71 | public DateTime? ActiveSince { get; set; }
|
---|
72 | public DateTime? ActiveUntil { get; set; }
|
---|
73 |
|
---|
74 |
|
---|
75 | public virtual User User { get; set; }
|
---|
76 | public virtual OrderState State { get; set; }
|
---|
77 | public virtual IList<Invoice> Invoices { get; set; }
|
---|
78 | public virtual IList<OrderLine> OrderLines { get; set; }
|
---|
79 | }
|
---|
80 |
|
---|
81 | public class OrderLine {
|
---|
82 | public long OrderLineId { get; set; }
|
---|
83 | public long OrderId { get; set; }
|
---|
84 | public long ProductId { get; set; }
|
---|
85 | public int Quantity { get; set; }
|
---|
86 | public double ProductPrice { get; set; }
|
---|
87 |
|
---|
88 | public virtual Order Order { get; set; }
|
---|
89 | public virtual Product Product { get; set; }
|
---|
90 | }
|
---|
91 |
|
---|
92 | public enum InvoiceStatus {
|
---|
93 | Open, Overdue, Paid
|
---|
94 | }
|
---|
95 |
|
---|
96 | public class Invoice {
|
---|
97 | public long InvoiceId { get; set; }
|
---|
98 | public long UserId { get; set; }
|
---|
99 | public long OrderId { get; set; }
|
---|
100 | public DateTime Due { get; set; }
|
---|
101 | public InvoiceStatus Status { get; set; }
|
---|
102 | public string InvoiceDocument { get; set; }
|
---|
103 |
|
---|
104 | public virtual User User { get; set; }
|
---|
105 | public virtual Order Order { get; set; }
|
---|
106 | public virtual IList<InvoiceLine> InvoiceLines { get; set; }
|
---|
107 | }
|
---|
108 |
|
---|
109 | public class InvoiceLine {
|
---|
110 | public long InvoiceLineId { get; set; }
|
---|
111 | public long InvoiceId { get; set; }
|
---|
112 | public long ProductId { get; set; }
|
---|
113 | public int Quantity { get; set; }
|
---|
114 | public double ProductPrice { get; set; }
|
---|
115 |
|
---|
116 | public virtual Invoice Invoice { get; set; }
|
---|
117 | public virtual Product Product { get; set; }
|
---|
118 | }
|
---|
119 |
|
---|
120 | public class UsageRecord {
|
---|
121 | public long UsageRecordId { get; set; }
|
---|
122 | public long UserId { get; set; }
|
---|
123 | public long ProductId { get; set; }
|
---|
124 | public DateTime Begin { get; set; }
|
---|
125 | public DateTime End { get; set; }
|
---|
126 | public int ServiceIdentifier { get; set; }
|
---|
127 | public int ResourceIdentifier { get; set; }
|
---|
128 |
|
---|
129 | public virtual User User { get; set; }
|
---|
130 | public virtual Product Product { get; set; }
|
---|
131 | }
|
---|
132 | }
|
---|