Files
xk-api-yii/common/modelsgii/UserCollect.php
2024-09-19 11:32:39 +08:00

59 lines
1.5 KiB
PHP

<?php
namespace common\modelsgii;
use admin\components\UI\Form\Text;
use JetBrains\PhpStorm\ArrayShape;
use MongoDB\BSON\Timestamp;
/**
* This is the model class for table "yii_user_collect".
*
* @property int $id
* @property int $user_id 用户id
* @property int $object_id 收藏对象id
* @property int $type 类型
* @property int $is_delete 是否取消收藏
* @property int $created_at 创建时间
* @property int $updated_at 更新时间
*/
class UserCollect extends \common\core\BaseActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName(): string
{
return 'yii_user_collect';
}
/**
* {@inheritdoc}
*/
public function rules(): array
{
return [
[['user_id', 'object_id'], 'required'],
[['id','user_id', 'object_id','type','is_delete'], 'integer'],
[['created_at', 'updated_at'], 'integer']
];
}
/**
* {@inheritdoc}
*/
#[ArrayShape(['id' => "string", 'user_id' => "string", 'object_id' => "string", 'type' => "string", 'is_delete' => "string", 'created_at' => "string", 'updated_at' => "string"])]
public function attributeLabels(): array
{
return [
'id' => 'ID',
'user_id' => '用户id',
'object_id' => '收藏对象id',
'type' => '类型',
'is_delete' => '是否取消收藏',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
}