28 lines
639 B
PHP
28 lines
639 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SerialNumberDetail extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'sn_batch_details';
|
|
|
|
protected $fillable = ['sn_batch_id', 'number','activated_at','invoice_id','activated_by'];
|
|
|
|
public function data(){
|
|
return $this->belongsTo(SerialNumber::class,"sn_batch_id");
|
|
}
|
|
|
|
public function invoice(){
|
|
return $this->belongsTo(PosInvoice::class,"invoice_id");
|
|
}
|
|
|
|
public function activatedBy(){
|
|
return $this->belongsTo(User::class,"activated_by");
|
|
}
|
|
}
|