oai datacite metadata
This commit is contained in:
parent
3c50618c8a
commit
e7d8dc21a0
7 changed files with 308 additions and 109 deletions
|
@ -12,6 +12,7 @@ use App\Models\XmlCache;
|
|||
use App\Models\File;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\GeolocationBox;
|
||||
|
||||
class Dataset extends Model
|
||||
{
|
||||
|
@ -51,6 +52,14 @@ class Dataset extends Model
|
|||
// $this->_init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the user that owns the phone.
|
||||
*/
|
||||
public function geolocation()
|
||||
{
|
||||
return $this->belongsTo(GeolocationBox::class, 'dataset_id', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the project that the dataset belongs to.
|
||||
*/
|
||||
|
|
25
app/Models/GeolocationBox.php
Normal file
25
app/Models/GeolocationBox.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\Dataset;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class GeolocationBox extends Model
|
||||
{
|
||||
protected $table = 'geolocation_box';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = ['xmin', 'xmax', 'ymin', 'ymax'];
|
||||
|
||||
protected $casts = [
|
||||
'xmin' => 'float',
|
||||
'xmax' => 'float',
|
||||
'ymin' => 'float',
|
||||
'ymax' => 'float'
|
||||
];
|
||||
|
||||
public function dataset()
|
||||
{
|
||||
return $this->belongsTo(Dataset::class, 'dataset_id', 'id');
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue