| 123456789101112131415161718192021222324252627282930 |
- <?php
- namespace App;
- use App\Traits\ModelTimeFormat;
- use Illuminate\Database\Eloquent\Model;
- class OwnerReport extends Model
- {
- use ModelTimeFormat;
- protected $fillable = [
- "owner_id", //货主ID
- "counting_month", //结算月
- "daily_average_order_amount", //日均单量
- "current_month_counting_area", //结算月盘点面积
- "last_month_counting_area", //结算月上月盘点面积
- "owner_bill_report_id" //账单ID
- ];
- public $timestamps = false;
- public function owner()
- { //货主
- return $this->hasOne(Owner::class,"id","owner_id");
- }
- public function ownerBillReport()
- { //账单
- return $this->hasOne(OwnerBillReport::class,"id","owner_bill_report_id");
- }
- }
|