12345678910111213141516171819 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class Audit extends Model
- {
- //定义表
- protected $table = "audit";
- //定义主键
- protected $primaryKey = "id";
- protected $fillable = ['user_id','amount','img_url','desc','status','activity'];
- // public $timestamps = false;
- public function user()
- {
- return $this->hasOne('App\Models\User','id','user_id');
- }
- }
|