Initial commit - construprogress app
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
||||
class Layer extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'project_id', 'phase_id', 'name', 'geojson_data', 'original_file', 'uploaded_by'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'geojson_data' => 'array',
|
||||
];
|
||||
|
||||
public function project()
|
||||
{
|
||||
return $this->belongsTo(Project::class);
|
||||
}
|
||||
|
||||
public function phase()
|
||||
{
|
||||
return $this->belongsTo(Phase::class);
|
||||
}
|
||||
|
||||
public function uploader()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'uploaded_by');
|
||||
}
|
||||
public function features()
|
||||
{
|
||||
return $this->hasMany(Feature::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user