Example #1
0
 public static Habit newHabit(string name, DaysOff days_off, Guid user_id)
 {
     return(new Habit(
                Guid.NewGuid(),
                name,
                days_off,
                new Streak(0, 0, 0, DateTime.Now, DateTime.Now),
                0,
                new List <DateTime>(),
                user_id,
                DateTime.Now
                ));
 }
Example #2
0
 public Habit(
     Guid id,
     string name,
     DaysOff days_off,
     Streak streak,
     int log_count,
     List <DateTime> logs,
     Guid user_id,
     DateTime created_at
     )
 {
     this._id         = id;
     this._name       = name;
     this._days_off   = days_off;
     this._streak     = streak;
     this._log_count  = log_count;
     this._logs       = logs;
     this._user_id    = user_id;
     this._created_at = created_at;
 }