diff --git a/app/models/Project.php b/app/models/Project.php new file mode 100644 index 0000000000..f0ee6dd727 --- /dev/null +++ b/app/models/Project.php @@ -0,0 +1,18 @@ +belongsTo('Account'); + } + + public function user() + { + return $this->belongsTo('User'); + } +} + diff --git a/app/models/ProjectCode.php b/app/models/ProjectCode.php new file mode 100644 index 0000000000..6a3755bfda --- /dev/null +++ b/app/models/ProjectCode.php @@ -0,0 +1,22 @@ +belongsTo('Account'); + } + + public function user() + { + return $this->belongsTo('User'); + } + + public function project() + { + return $this->belongsTo('Project'); + } +} \ No newline at end of file diff --git a/app/models/TimeSheet.php b/app/models/TimeSheet.php index 03d0b11ad7..8562515ea0 100755 --- a/app/models/TimeSheet.php +++ b/app/models/TimeSheet.php @@ -1,7 +1,22 @@ belongsTo('Account'); + } + + public function user() + { + return $this->belongsTo('User'); + } + + public function timesheet_events() + { + return $this->hasMany('TimeSheetEvent'); + } } diff --git a/app/models/TimeSheetEvent.php b/app/models/TimeSheetEvent.php new file mode 100644 index 0000000000..6b624da441 --- /dev/null +++ b/app/models/TimeSheetEvent.php @@ -0,0 +1,37 @@ +belongsTo('Account'); + } + + public function user() + { + return $this->belongsTo('User'); + } + + public function source() + { + return $this->belongsTo('TimeSheetEventSource'); + } + + public function timesheet() + { + return $this->belongsTo('TimeSheet'); + } + + public function project() + { + return $this->belongsTo('Project'); + } + + public function project_code() + { + return $this->belongsTo('ProjectCode'); + } +} diff --git a/app/models/TimeSheetEventSource.php b/app/models/TimeSheetEventSource.php new file mode 100644 index 0000000000..161c9d3167 --- /dev/null +++ b/app/models/TimeSheetEventSource.php @@ -0,0 +1,17 @@ +belongsTo('Account'); + } + + public function user() + { + return $this->belongsTo('User'); + } +} \ No newline at end of file