<?php

class SellerlistCheck extends Check {	
	public function addCheck(Model &$_model) {
		if (self::isNullString($_POST['name'])) {
			$this->_message[] = '商家名称不能为空';
			$this->_flag = false;
		}
		if (self::isNullString($_POST['click_url'])) {
			$this->_message[] = '跳转地址不能为空';
			$this->_flag = false;
		}
		if (self::isNullString($_POST['description'])) {
			$this->_message[] = '商家描述不能为空';
			$this->_flag = false;
		}				
		return $this->_flag;
	}
	
	public function updateCheck(Model &$_model) {
		if (self::isNullString($_POST['name'])) {
			$this->_message[] = '商家名称不能为空';
			$this->_flag = false;
		}
		if (self::isNullString($_POST['click_url'])) {
			$this->_message[] = '跳转地址不能为空';
			$this->_flag = false;
		}
		if (self::isNullString($_POST['description'])) {
			$this->_message[] = '商家描述不能为空';
			$this->_flag = false;
		}				
		return $this->_flag;
	}
}
?>