* @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', ]; } }