Update models with more functionality

This is a small commit that aims to add some more descriptive
functionality to the models.

Guest now has more creditcard information
such as CCV and an expiration date to bring it in-line with what would
be expected.

Reservation implemented a very loose cancellation function,
this may be moved out.

Transaction has a few more tweaks that follows the same goal as guest,
however this functionality may be migrated as well.
This commit is contained in:
雲華
2022-04-09 04:45:42 -04:00
parent c1526a123f
commit f1a1b5d067
3 changed files with 54 additions and 18 deletions

View File

@@ -48,14 +48,16 @@ namespace Ophelias.Models
CheckOut = null;
DateChanged = null;
}
internal void ChangeReservation(ReservationType type)
internal void ChangeReservation(ReservationType type, Transaction t, BaseRate b)
{
Status = ReservationStatus.Changed;
Type = type;
t.Penalize(this, b.Rate);
}
internal void CancelReservation()
internal void CancelReservation(Transaction t)
{
Status = ReservationStatus.Cancelled;
t.Penalize(this);
}
}
internal enum ReservationStatus