63 lines
1.6 KiB
PHP
63 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace app\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "{{%comment}}".
|
|
*
|
|
* @property int $id
|
|
* @property int $user_id 评论人ID
|
|
* @property int $to_user_id 被评价人ID
|
|
* @property int $level 星级-学员评价的时候才有
|
|
* @property int $store_id 门店ID
|
|
* @property string $content 评价内容
|
|
* @property int $device_id 场次ID
|
|
* @property int|null $created_at 时间戳
|
|
* @property int $is_delete 是否删除
|
|
* @property int $deleted_at 删除时间
|
|
*/
|
|
class Comment extends \yii\db\ActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return '{{%comment}}';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['user_id', 'to_user_id', 'store_id', 'content', 'device_id', 'type'], 'required'],
|
|
[['user_id', 'to_user_id', 'level', 'store_id', 'device_id', 'created_at', 'is_delete', 'deleted_at', 'type'], 'integer'],
|
|
[['content'], 'string'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'user_id' => '评论人ID',
|
|
'to_user_id' => '被评价人ID',
|
|
'level' => '星级-学员评价的时候才有',
|
|
'store_id' => '门店ID',
|
|
'content' => '评价内容',
|
|
'device_id' => '场次ID',
|
|
'created_at' => '时间戳',
|
|
'is_delete' => '是否删除',
|
|
'deleted_at' => '删除时间',
|
|
'type' => '评价类型',
|
|
];
|
|
}
|
|
}
|