12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace common\models;
- use Yii;
- use yii\behaviors\TimestampBehavior;
- /**
- * This is the model class for table "{{%user_behavior_log}}".
- *
- * @property integer $id
- * @property string $behavior_name
- * @property integer $user_id
- * @property string $content
- * @property integer $created_at
- */
- class UserBehaviorLog extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%user_behavior_log}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['behavior_id', 'user_id'], 'integer'],
- ['content', 'string']
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => Yii::t('common', 'ID'),
- 'behavior_id' => Yii::t('common', 'Behavior ID'),
- 'user_id' => Yii::t('common', 'User ID'),
- 'content' => Yii::t('common', '日志内容'),
- 'created_at' => Yii::t('common', 'Created At'),
- ];
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::className(),
- 'updatedAtAttribute' => false
- ]
- ];
- }
- }
|