Skip to content

Instantly share code, notes, and snippets.

@amarwadi
Last active January 22, 2018 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amarwadi/9fb290b1533601f3d6ffc96920451aea to your computer and use it in GitHub Desktop.
Save amarwadi/9fb290b1533601f3d6ffc96920451aea to your computer and use it in GitHub Desktop.
A revised Installment model
public class Installment : AggregateRoot
{
public string Id { get; private set; }
public string Title { get; protected set; }
public string Description { get; protected set; }
public uint InstallmentFrequencyInDays { get; protected set; }
public decimal DownPayment { get; protected set; }
public uint TotalInstallments { get; protected set; }
public Installment(string title, string description, uint installmentFrequencyDays, decimal downPayment, uint totalInstallments)
{
Title = title;
Description = description;
InstallmentFrequencyInDays = installmentFrequencyDays;
DownPayment = downPayment;
TotalInstallments = totalInstallments;
Id = Guid.NewGuid().ToString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment