<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use Slowlyo\OwlAdmin\Models\BaseModel as Model;

/**
 * 技师
 */
class CoachUser extends Model
{
	use SoftDeletes;

	protected $table = 'coach_users';

    protected $guarded = [];

    protected static function booted()
	{
		static::created(function ($user) {
			$user->wallet()->create([
				'owner_type' => CoachUser::class,
				'owner_id' => $user->id
			]);
		});
	}
}
