protected/models/Order.php

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

/**
 * This is the model class for table "order".
 *
 * The followings are the available columns in table 'order':
 * @property string $id
 * @property string $orderNum
 * @property string $orderPrice
 * @property string $orderAddress
 * @property string $orderTel
 * @property string $orderDesc
 * @property string $orderCreateTime
 * @property string $userId
 * @property string $orderState
 * @property string $acceptTime
 * @property string $acceptName
 * @property string $orderImg
 * @property string $orderDishDesc
 * @property string $orderFlag
 *
 * The followings are the available model relations:
 * @property DishOrder[] $dishOrders
 * @property User $user
 */
class Order extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @param string $className active record class name.
	 * @return Order the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'order';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	/*public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('orderNum, orderPrice, orderAddress, orderCreateTime, userId, orderState, acceptTime, acceptName, orderImg, orderDishDesc', 'required'),
			array('orderNum, orderPrice, orderAddress, orderTel, orderDesc, orderState, acceptTime, acceptName, orderImg, orderDishDesc', 'length', 'max'=>45),
			array('userId, orderFlag', 'length', 'max'=>10),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, orderNum, orderPrice, orderAddress, orderTel, orderDesc, orderCreateTime, userId, orderState, acceptTime, acceptName, orderImg, orderDishDesc, orderFlag', 'safe', 'on'=>'search'),
		);
后面还有 69 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。