<?php

namespace System\Model;
use Think\Model\RelationModel;
class AdminModel extends RelationModel {
	/**
	 * [$_link 关联模型]
	 * @var array
	 */
	protected $_link = array(
		'Admin_info' => array(
			'mapping_type' => self::HAS_ONE,
			'mapping_name' => 'info',
			'foreign_key' => 'uid',
			'as_fields' => 'sex,year,edu,phone,qq,alipay,qt',
			),
		);

	/**
	 * [$_auto 自动完成]
	 * @var array
	 */
	protected $_auto = array(
		//password字段不存在，用phone字段代替
		// array('password','phone',1,'field'),
		array('password','md5',3,'function'),
		array('anquan','md5',2,'function'),
		array('zctime','time',1,'function'),
		array('jhtime','time',1,'function'),
		array('sjtime','time',2,'function','ignore'),
		);
}