完成分类和文章的模板设置

This commit is contained in:
2020-04-18 23:14:43 +08:00
parent d35febf9f6
commit 1ec8c07250
18 changed files with 285 additions and 30 deletions

View File

@@ -39,6 +39,7 @@ class CreateTableNav extends Migrator
$table->addColumn(ColumnFormat::timestamp('delete_time'));
$table->addColumn(Column::make('type','integer')->setLimit(10)->setSigned(false)->setComment('类型,用于区分业务场景:1:PC导航,2:PC轮播图,3:PC友情链接'));
$table->addColumn(Column::make('img','string')->setLimit(100)->setComment('图片'));
$table->addColumn(ColumnFormat::stringLong('desc')->setComment('副标题描述'));
$table->addColumn(Column::make('target','string')->setLimit(10)->setSigned(false)->setComment('网页链接打开对象,_BLANK,_SELF,iframe_name'));
$table->addColumn(Column::make('xcx_type','integer')->setLimit(10)->setComment('小程序打开方式,1:小程序导航页面,2:普通页面,3:web-view,4:其他小程序,5:电话'));
$table->addColumn(Column::make('value','string')->setLimit(100)->setComment('对象值,有可能是网页链接,小程序导航页面路径,小程序普通页面路径,电话'));

View File

@@ -48,6 +48,7 @@ class CreateTablePost extends Migrator
$table->addColumn(ColumnFormat::integerTypeStatus('type')->setComment('类型,1:文章,有分类有标签,2:页面,无分类无标签'));
$table->addColumn(Column::make('files','text')->setComment('附件'));
$table->addColumn(Column::make('pictures','text')->setComment('相册'));
$table->addColumn(ColumnFormat::stringShort('tpl_name')->setComment('模板名称'));
$table->addIndex('type');
$table->addIndex('status');
$table->addIndex('delete_time');

View File

@@ -37,6 +37,9 @@ class CreateTableCategory extends Migrator
->addColumn(ColumnFormat::timestamp('delete_time'))
->addColumn(ColumnFormat::integer('pid')->setComment('上级id'))
->addColumn(ColumnFormat::integer('level')->setDefault(1)->setComment('层级'))
->addColumn(ColumnFormat::stringShort('tpl_name')->setComment('模板名称'))
->addColumn(ColumnFormat::stringUrl('title_img')->setComment('附图'))
->addColumn(ColumnFormat::stringLong('desc')->setComment('副标题描述'))
->addIndex('pid')
->create();
}