Exemplo n.º 1
0
 protected PlannedExpence(Guid id, string name, string description, decimal bill, DateTime transactionDateTime,
                          ExpenceType type)
 {
     Id          = id;
     Name        = name;
     Description = description;
     SetBill(bill);
     Type = type;
     TransactionDateTime = transactionDateTime;
     CreatedAt           = DateTime.UtcNow;
 }
Exemplo n.º 2
0
        public void AddExpenceType(string name, string description)
        {
            var type = GetExpenceType(name);

            if (type != null)
            {
                throw new Exception(); // TODO
            }

            _expenceTypes.Add(ExpenceType.Create(name, description));
        }
Exemplo n.º 3
0
        public void AddPlannedExpence(Guid id, string name, string description, decimal bill,
                                      DateTime transactionDateTime, ExpenceType type)
        {
            var expence = GetPlannedExpence(id);

            if (expence != null)
            {
                throw new Exception(); // TODO
            }

            _plannedExpences.Add(PlannedExpence.Create(id, name, description, bill, transactionDateTime, type));
        }
Exemplo n.º 4
0
 public static PlannedExpence Create(Guid id, string name, string description, decimal bill, DateTime transactionDateTime,
                                     ExpenceType type)
 => new PlannedExpence(id, name, description, bill, transactionDateTime, type);