255], [['breakfast'], 'string', 'max' => 20], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'main_order_id' => 'Main Order ID', 'hotel_id' => 'Hotel ID', 'room_id' => 'Room ID', 'hotel_name' => 'Hotel Name', 'room_name' => 'Room Name', 'breakfast' => 'Breakfast', 'total_details' => 'Total Details', 'remarks' => 'Remarks', 'is_gift' => 'Is Gift', 'gift_describe' => 'Gift Describe', 'is_confirm' => 'Is Confirm', 'address' => 'address' ]; } /** * Des:添加记录 * Name: addRow * @param $data * @return array * @author 倪宗锋 */ public function addRow($data) { $this->attributes = $data; $insertFlag = $this->insert(); if (!$insertFlag) { return Util::returnArrEr('add hotel_extra fail!'); } return Util::returnArrSu(); } /** * Des:修改订单信息 * Name: upOrder * @param $value * @param $orderId * @return int * @author 倪宗锋 */ public function upOrder($value, $orderId) { $count = self::updateAll($value, ['=', 'main_order_id', $orderId]); return $count; } }