function ChildFactory($filter) {
	'use strict';

	return function ChildFactory(child) {
		this.name = name;
		this.recording = false;
		this.activities = [];
		this.lastActivitySummary = 'Created';
		this.lastActivitySummaryDate = new Date();
		this.expanded = false;

		this.isValid = function isValid() {
			if (typeof this.name === 'string' && this.name.length > 0) {
				return true;
			}
			return false;
		};

		this.updateActivitySummary = function updateActivitySummary(action) {
			this.lastActivitySummary = action;
			this.lastActivitySummaryDate = new Date();
		};

		this.getActivitiesByType = function getActivitiesByType(activityType) {
			return $filter('filter')(this.activities, { type: activityType });
		};

		this.getLastActivity = function getLastActivity(activityType) {
			var filteredActivities = this.getActivitiesByType(activityType);
			return filteredActivities[filteredActivities.length - 1];
		};

		this.getLastActivityLength = function getLastActivityLength(activityType) {
			if (this.activities.length === 0) return null;

			var lastActivity = this.getLastActivity(activityType)
			if (!lastActivity.endTime) return null;

			var timeDiff = new Date(lastActivity.endTime) - new Date(lastActivity.startTime);
			return $filter('momentHumanize')(timeDiff);
		};

		if (child) {
			angular.extend(this, child);
		}
	};
}