1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- /**
- * FecShop file.
- *
- * @link http://www.fecshop.com/
- * @copyright Copyright (c) 2016 FecShop Software LLC
- * @license http://www.fecshop.com/license/
- */
- namespace fecshop\models\mongodb;
- use yii\mongodb\ActiveRecord;
- /**
- * @author Terry Zhao <2358269014@qq.com>
- * @since 1.0
- */
- class FecshopServiceLog extends ActiveRecord
- {
- /**
- * mongodb collection 的名字,相当于mysql的table name
- */
- public static function collectionName()
- {
- return 'fecshop_service_log';
- }
- /**
- * mongodb是没有表结构的,因此不能像mysql那样取出来表结构的字段作为model的属性
- * 因此,需要自己定义model的属性,下面的方法就是这个作用
- */
- public function attributes()
- {
- return [
- '_id',
- 'service_file',
- 'service_method',
- 'service_method_argument',
- 'begin_microtime',
- 'end_microtime',
- 'used_time',
- 'process_date_time',
- ];
- }
- }
|