<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Aftersale extends Model
{
    protected $table = 'aftersale';
    // 拒绝添加的字段
    protected $guarded = [];
    public $timestamps=false;

    public function pt(){
        return $this->hasOne(Pt::class,'id','afs_pid')->select('id','pt_name');
    }
    public function admin(){
        return $this->hasOne(Admin::class,'id','afs_serid')->select('id','company_name');
    }
}
