You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

59 lines
1.3 KiB

<?php
namespace common\models;
/**
* Created by PhpStorm.
* User: iron
* Date: 19-1-15
* Time: 下午7:40
*
* @property int $admin_id 管理员id
* @property string $admin_name 管理员名
* @property string $ip 客户端ip
* @property string $admin_agent 客户端版本
* @property string $path 访问路径
* @property string $method http方法
* @property array $params 各类参数
* @property int $created_at 创建时间
*/
use yii\mongodb\ActiveRecord;
class DailyActiveUser extends ActiveRecord
{
/**
* @return string the name of the index associated with this ActiveRecord class.
*/
public static function collectionName()
{
return 'daily_active_user';
}
/**
* @return array list of attribute names.
*/
public function attributes()
{
return ['_id', 'date', 'created_at', 'user_ids', 'count'];
}
public function rules()
{
return [
['count','default','value'=>1],
['created_at','default','value'=>time()]
];
}
public function attributeLabels()
{
return [
'date' => '日期',
'created_at' => '创建时间',
'user_ids' => '用户id',
'count' => '数量'
];
}
}