123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- /**
- * Created by 上海互教教育科技有限公司.
- * User: 刘红伟
- * QQ : 454303753
- * Date: 2016/10/28 0028
- * Time: 上午 11:20
- */
- class MongodbHandlerLog extends EMongoDocument {
- public $school_id;
- public $coach_id;
- public $url;
- public $session;
- public $post;
- public $ip;
- public $create_time;
- public static function model($className = __CLASS__){
- return parent::model($className);
- }
- public function collectionName()
- {
- return 'coach_handler_logs';
- }
- public function add($school_id,$coach_id,$url,$session,$post,$ip) {
- $this->school_id = $school_id;
- $this->coach_id = $coach_id;
- $this->url = $url;
- $this->session = json_encode($session);
- $this->post = json_encode($post);
- $this->ip = $ip;
- $this->create_time = time();
- $this->insert();
- }
- }
|