1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Added models for the TimeSheet migration

This commit is contained in:
Troels Liebe Bentsen 2014-10-01 03:01:41 +02:00
parent f7d5c50d67
commit 6b9b3fd317
5 changed files with 111 additions and 2 deletions

18
app/models/Project.php Normal file
View File

@ -0,0 +1,18 @@
<?php
class Project extends Eloquent
{
public $timestamps = false;
protected $softDelete = false;
public function account()
{
return $this->belongsTo('Account');
}
public function user()
{
return $this->belongsTo('User');
}
}

View File

@ -0,0 +1,22 @@
<?php
class ProjectCode extends Eloquent
{
public $timestamps = false;
protected $softDelete = false;
public function account()
{
return $this->belongsTo('Account');
}
public function user()
{
return $this->belongsTo('User');
}
public function project()
{
return $this->belongsTo('Project');
}
}

View File

@ -1,7 +1,22 @@
<?php
class InvoiceStatus extends Eloquent
class TimeSheet extends Eloquent
{
public $timestamps = false;
protected $softDelete = false;
protected $softDelete = false;
public function account()
{
return $this->belongsTo('Account');
}
public function user()
{
return $this->belongsTo('User');
}
public function timesheet_events()
{
return $this->hasMany('TimeSheetEvent');
}
}

View File

@ -0,0 +1,37 @@
<?php
class TimeSheetEvent extends Eloquent
{
public $timestamps = false;
protected $softDelete = false;
public function account()
{
return $this->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');
}
}

View File

@ -0,0 +1,17 @@
<?php
class TimeSheetEventSource extends Eloquent
{
public $timestamps = false;
protected $softDelete = false;
public function account()
{
return $this->belongsTo('Account');
}
public function user()
{
return $this->belongsTo('User');
}
}