12345678910111213141516171819202122232425262728 |
- <?php
- class MongodbDeleteClassLog extends EMongoDocument {
- public $school_id;
- public $coach_id;
- public $table_name;
- public $content;
- public $create_time;
- public static function model($className = __CLASS__){
- return parent::model($className);
- }
- public function collectionName()
- {
- return 'exam_class_delete_log';
- }
- public static function add($collection,$school_id,$coach_id,$model)
- {
- $collection->insert(array(
- 'school_id' => $school_id,
- 'coach_id' => $coach_id,
- 'table_name' => $model->tableName(),
- 'content' => json_encode($model->attributes,true),
- 'create_time' => time()));
- }
- }
|