27 lines
530 B
PHP
Executable File
27 lines
530 B
PHP
Executable File
<?php
|
|
namespace app\model;
|
|
|
|
class Model extends Base
|
|
{
|
|
// 文章模型ID
|
|
const MODEL_ARTICLE = 31;
|
|
// 单页模型
|
|
const MODEL_PAGE = 33;
|
|
// 产品模型
|
|
const MODEL_PRODUCT = 36;
|
|
// 下载中心
|
|
const MODEL_DOWNLOAD = 37;
|
|
|
|
//获取模型列表
|
|
public static function getList()
|
|
{
|
|
return self::order('sort asc')
|
|
->select()
|
|
->toArray();
|
|
}
|
|
public static function onAfterInsert($model)
|
|
{
|
|
$model->sort = $model->id;
|
|
$model->save();
|
|
}
|
|
} |