<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;

class Children extends Model {
	protected $casts = [
			'classes' => 'json',
	];
	protected $table = 'children';
	protected $fillable = [ 
			'realname',
			'sex',
			'birthday',
			'photo',
			'parent_id',
			'age',
			'starttime',
			'endtime','classes'
	];
	static $sexMap = [ 
			0 => '女',
			1 => '男'
	];
	public function user()
	{
		return $this->belongsTo(User::class, 'parent_id');
	}
	
}
