seam 8 years ago
parent
commit
be3e794496

+ 70 - 0
www/protected/modules/moonclub/models/Accessories.php

@@ -0,0 +1,70 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: north.Deng
+ * Date: 2017/07/20
+ * Time: 10:53
+ * 用户详细信息
+ */
+class accessories 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 'accessories';
+  }
+
+  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);
+  }
+
+
+}

+ 70 - 0
www/protected/modules/moonclub/models/Foods.php

@@ -0,0 +1,70 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: north.Deng
+ * Date: 2017/07/20
+ * Time: 10:53
+ * 用户详细信息
+ */
+class foods 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 'foods';
+  }
+
+  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);
+  }
+
+
+}

+ 70 - 0
www/protected/modules/moonclub/models/NutritiousMeals.php

@@ -0,0 +1,70 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: north.Deng
+ * Date: 2017/07/20
+ * Time: 10:53
+ * 用户详细信息
+ */
+class nutritious_meals 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 'nutritious_meals';
+  }
+
+  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);
+  }
+
+
+}

+ 70 - 0
www/protected/modules/moonclub/models/Prolactins.php

@@ -0,0 +1,70 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: north.Deng
+ * Date: 2017/07/20
+ * Time: 10:53
+ * 用户详细信息
+ */
+class prolactins 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 'prolactins';
+  }
+
+  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);
+  }
+
+
+}

+ 70 - 0
www/protected/modules/moonclub/models/Techs.php

@@ -0,0 +1,70 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: north.Deng
+ * Date: 2017/07/20
+ * Time: 10:53
+ * 用户详细信息
+ */
+class techs 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 'techs';
+  }
+
+  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);
+  }
+
+
+}

+ 70 - 0
www/protected/modules/moonclub/models/YsServices.php

@@ -0,0 +1,70 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: north.Deng
+ * Date: 2017/07/20
+ * Time: 10:53
+ * 用户详细信息
+ */
+class ys_services 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 'ys_services';
+  }
+
+  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);
+  }
+
+
+}