فهرست منبع

打印模板关联

ajun 4 سال پیش
والد
کامیت
7cca8bae98
1فایلهای تغییر یافته به همراه21 افزوده شده و 0 حذف شده
  1. 21 0
      app/OwnerLogisticPrintTemplate.php

+ 21 - 0
app/OwnerLogisticPrintTemplate.php

@@ -0,0 +1,21 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+use App\Traits\ModelLogChanging;
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
+
+class OwnerLogisticPrintTemplate extends Model
+{
+    use ModelLogChanging;
+
+    protected $fillable = ['owner_id','logistic_id','print_template_id'];
+    //
+
+    public function printTemplate(): BelongsTo
+    {
+        return $this->belongsTo(PrintTemplate::class);
+    }
+}