初始化仓库

This commit is contained in:
2024-09-19 11:32:39 +08:00
commit 8f5315e936
921 changed files with 76455 additions and 0 deletions

35
admin/models/Page.php Normal file
View File

@@ -0,0 +1,35 @@
<?php
namespace admin\models;
use Yii;
/*
* ---------------------------------------
* 文章模型
* ---------------------------------------
*/
class Page extends \common\modelsgii\Page
{
/**
* @inheritdoc
*/
public function behaviors()
{
return [
/**
* 写库和更新库时,时间自动完成
* 注意rules验证必填时可使用AttributeBehavior行为,model的EVENT_BEFORE_VALIDATE事件
*/
'timestamp' => [
'class' => 'yii\behaviors\TimestampBehavior',
'createdAtAttribute' => 'create_time',
'updatedAtAttribute' => 'update_time',
'value' => time(),
],
];
}
}