|
@@ -1,70 +0,0 @@
|
|
|
-<?php
|
|
|
-/**
|
|
|
- * Created by PhpStorm.
|
|
|
- * User: north.Deng
|
|
|
- * Date: 2017/07/20
|
|
|
- * Time: 10:53
|
|
|
- * 用户详细信息
|
|
|
- */
|
|
|
-class yuesaos extends MongoAr{
|
|
|
- public $_id;
|
|
|
- public $num; // 月嫂协议号
|
|
|
- public $xyh_order_id;// 订单编号
|
|
|
- public $status;// 未预约 0 已预约 1 已诊脉
|
|
|
- public $user_name;// 月嫂姓名
|
|
|
- public $month_address;// 月子地址
|
|
|
- public $posts_time;// 上岗日期
|
|
|
- public $end_time;// 结束日期
|
|
|
- public $remarks;// 备注
|
|
|
-
|
|
|
-
|
|
|
- public function __construct($scenario='insert'){
|
|
|
- $this->setMongoDBComponent(Yii::app()->getComponent('mongodb_o2o'));
|
|
|
- parent::__construct($scenario);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public static function model($className=__CLASS__)
|
|
|
- {
|
|
|
- return parent::model($className);
|
|
|
- }
|
|
|
-
|
|
|
- public function getCollectionName()
|
|
|
- {
|
|
|
- return 'yuesaos';
|
|
|
- }
|
|
|
-
|
|
|
- public static function get($_id) {
|
|
|
- if(CommonFn::isMongoId($_id)){
|
|
|
- $criteria = new EMongoCriteria();
|
|
|
- $criteria->_id('==', $_id);
|
|
|
- $model = self::model()->find($criteria);
|
|
|
- return $model;
|
|
|
- }else{
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public function parseRow($row,$output=array()){
|
|
|
- $newRow = array();
|
|
|
- $newRow['id'] = (string)$row['_id'];
|
|
|
- $newRow['num'] = CommonFn::get_val_if_isset($row,'num','');
|
|
|
- $newRow['xyh_order_id'] = CommonFn::get_val_if_isset($row,'xyh_order_id','');
|
|
|
- $newRow['status'] = CommonFn::get_val_if_isset($row,'status','');
|
|
|
- $newRow['user_name'] = CommonFn::get_val_if_isset($row,'user_name','');
|
|
|
- $newRow['month_address'] = CommonFn::get_val_if_isset($row,'month_address','');
|
|
|
- $newRow['posts_time'] = CommonFn::get_val_if_isset($row,'posts_time','');
|
|
|
- $newRow['end_time'] = CommonFn::get_val_if_isset($row,'end_time','');
|
|
|
- $newRow['remarks'] = CommonFn::get_val_if_isset($row,'remarks','');
|
|
|
-
|
|
|
- if(APPLICATION=='admin'){
|
|
|
- $newRow['action_user'] = CommonFn::get_val_if_isset($row,'action_user',"");
|
|
|
- $newRow['action_time'] = CommonFn::get_val_if_isset($row,'action_time',"");
|
|
|
- $newRow['action_log'] = CommonFn::get_val_if_isset($row,'action_log',"");
|
|
|
-
|
|
|
- }
|
|
|
- return $this->output($newRow,$output);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-}
|