<?php
namespace app\common\model;

use think\Model;

class Navigation extends Model
{
	// 设置字段信息
    protected $schema = [
        'id'			=> 'int',
		'pagetab'		=> 'string',
		'title'			=> 'string',
		'tilpic'		=> 'string',
		'ntype'		    => 'tinyint',
		'tilurl'		=> 'string',
		'priority'		=> 'int'
    ];
	
	public function getNtypeTextAttr($value,$data)
	{
		$ntype = [1=>'系统链接', 2=>'网络链接'];
		return $ntype[$data['ntype']];
	}
	
}