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:
parent
f7d5c50d67
commit
6b9b3fd317
18
app/models/Project.php
Normal file
18
app/models/Project.php
Normal 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');
|
||||
}
|
||||
}
|
||||
|
22
app/models/ProjectCode.php
Normal file
22
app/models/ProjectCode.php
Normal 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');
|
||||
}
|
||||
}
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
37
app/models/TimeSheetEvent.php
Normal file
37
app/models/TimeSheetEvent.php
Normal 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');
|
||||
}
|
||||
}
|
17
app/models/TimeSheetEventSource.php
Normal file
17
app/models/TimeSheetEventSource.php
Normal 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');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user