new: assign segment to company created. #1

This commit is contained in:
weichien00
2021-06-26 00:27:55 +08:00
parent b6f56ffebd
commit d3fa2170f7
9 changed files with 378 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Segment
* @package App\Models
*
* @property string name
* @property string reference
*/
class Segment extends AbstractModel
{
use SoftDeletes;
protected $table = 'segments';
protected $dates = ['deleted_at'];
/**
* @return HasMany
*/
public function constants(): HasMany
{
return $this->HasMany(SegmentConstant::class, 'segment_id', 'id');
}
}