Skip to content

Commit

Permalink
Merge pull request #397 from ucdavis/JCS/DbChanges20240725
Browse files Browse the repository at this point in the history
Set some max lengths for strings
  • Loading branch information
jSylvestre authored Jul 25, 2024
2 parents d52ff4d + 4eee69f commit e4fb1b4
Show file tree
Hide file tree
Showing 11 changed files with 2,534 additions and 12 deletions.
1 change: 1 addition & 0 deletions Hippo.Core/Domain/Billing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class Billing
[Key]
public int Id { get; set; }
[Required]
[MaxLength(128)]
public string ChartString { get; set; }
public decimal Percentage { get; set; } = 100;
[Required]
Expand Down
2 changes: 2 additions & 0 deletions Hippo.Core/Domain/FinancialDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ public class FinancialDetail
{
[Key]
public int Id { get; set; }
[MaxLength(200)]
public string SecretAccessKey { get; set; } //Used to get the FinancialSystemApiKey from the secret service
[Required]
[MaxLength(50)]
public string FinancialSystemApiSource { get; set; }
[MaxLength(128)]
public string ChartString { get; set; }
public bool AutoApprove { get; set; }
[Required]
Expand Down
1 change: 1 addition & 0 deletions Hippo.Core/Domain/Order.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class Order :ProductBase
public decimal BalanceRemaining { get; set; } //We will also calculate this when we do a payment
public string Notes { get; set; }
public string AdminNotes { get; set; }
[MaxLength(20)]
public string Status { get; set; }

public DateTime? InstallmentDate { get; set; }
Expand Down
7 changes: 5 additions & 2 deletions Hippo.Core/Domain/Payment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ public class Payment
{
[Key]
public int Id { get; set; }
[MaxLength(128)]
public string FinancialSystemId { get; set; } //For sloth, this is the transaction ID (guid)
public string TrackingNumber { get; set; } // KFS tracking number
[MaxLength(20)]
public string TrackingNumber { get; set; } // KFS tracking number. So probably only ever 10 characters...
public DateTime CreatedOn { get; set; } = DateTime.UtcNow;
public decimal Amount { get; set; }
[MaxLength(20)]
public string Status { get; set; }

[MaxLength(250)]
public string Details { get; set; } //chart strings, credit/debit, and amounts


Expand Down
1 change: 1 addition & 0 deletions Hippo.Core/Domain/ProductBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class ProductBase
public string Name { get; set; }
[MaxLength(250)]
public string Description { get; set; }
[MaxLength(50)]
public string Units { get; set; } //Informational like TB, or fair share points
[Required]
[Range(0.01, double.MaxValue)]
Expand Down
Loading

0 comments on commit e4fb1b4

Please sign in to comment.