From 963bcecadb1397aa7d735a20231992c6a81d0937 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Mon, 30 Dec 2024 15:56:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=95=B0=E6=8D=AE=E8=A1=A8=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20241230064542_create_sys_setting.php | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 database/migrations/20241230064542_create_sys_setting.php diff --git a/database/migrations/20241230064542_create_sys_setting.php b/database/migrations/20241230064542_create_sys_setting.php new file mode 100644 index 00000000..a2ec2ef7 --- /dev/null +++ b/database/migrations/20241230064542_create_sys_setting.php @@ -0,0 +1,65 @@ +table('sys_setting', ['engine' => 'InnoDB', 'comment' => '系统设置表']); + $table->addColumn('language_id', 'integer', ['null' => false, 'comment' => '语言ID']) + ->addColumn('title', 'string', ['limit' => 128, 'default' => '', 'comment' => '站点标题']) + ->addColumn('logo', 'string', ['limit' => 255, 'default' => '', 'comment' => '站点logo']) + ->addColumn('keywords', 'string', ['limit' => 255, 'default' => '', 'comment' => '搜索引擎关键字']) + ->addColumn('icp', 'string', ['limit' => 128, 'default' => '', 'comment' => '站点备案号']) + ->addColumn('copyright', 'string', ['limit' => 128, 'default' => '', 'comment' => '站点版本信息']) + ->addColumn('statistics_code', 'boolean', ['limit' => 255, 'default' => 1, 'comment' => '站点统计代码']) + ->addColumn('tel', 'string', ['limit' => 64, 'default' => '', 'comment' => '固定电话']) + ->addColumn('email', 'string', ['limit' => 128, 'default' => '', 'comment' => '邮箱']) + ->addColumn('paginate_size', 'integer', ['limit' => 11, 'default' => 10, 'comment' => '分页大小']) + ->addColumn('aliyun_sms_access_id', 'string', ['limit' => 128, 'default' => '', 'comment' => '阿里云短信AccessId']) + ->addColumn('aliyun_sms_access_key', 'string', ['limit' => 128, 'default' => '', 'comment' => '阿里云短信AccessKey']) + ->addColumn('aliyun_sms_sign_name', 'string', ['limit' => 128, 'default' => '', 'comment' => '阿里云短信签名']) + ->addColumn('aliyun_sms_template_code', 'string', ['limit' => 128, 'default' => '', 'comment' => '阿里云短信模板']) + ->addColumn('email_smtp_host', 'string', ['limit' => 128, 'default' => '', 'comment' => 'SMTP服务器']) + ->addColumn('email_smtp_port', 'integer', ['limit' => 11, 'default' => 25, 'comment' => 'SMTP端口']) + ->addColumn('email_smtp_user', 'string', ['limit' => 128, 'default' => '', 'comment' => 'SMTP用户名']) + ->addColumn('email_smtp_password', 'string', ['limit' => 128, 'default' => '', 'comment' => 'SMTP密码']) + ->addColumn('email_smtp_secure', 'string', ['limit' => 128, 'default' => '', 'comment' => 'SMTP加密']) + ->addColumn('email_from', 'string', ['limit' => 128, 'default' => '', 'comment' => '发件人邮箱']) + ->addColumn('enabled_watermark', 'boolean', ['null' => false, 'default' => 0, 'comment' => '是否启用水印']) + ->addColumn('watermark_type', 'boolean', ['null' => false, 'default' => 1, 'comment' => '水印类型:1为文字,2为图片']) + ->addColumn('watermark_text', 'string', ['limit' => 128, 'default' => '', 'comment' => '水印文字']) + ->addColumn('watermark_image', 'string', ['limit' => 255, 'default' => '', 'comment' => '水印图片']) + ->addColumn('watermark_width', 'integer', ['limit' => 11, 'default' => 100, 'comment' => '水印宽度']) + ->addColumn('watermark_height', 'integer', ['limit' => 11, 'default' => 100, 'comment' => '水印高度']) + ->addColumn('watermark_opacity', 'integer', ['limit' => 11, 'default' => 100, 'comment' => '水印透明度']) + ->addColumn('watermark_quality', 'integer', ['limit' => 11, 'default' => 10, 'comment' => 'JPEG水印质量']) + ->addColumn('watermark_position', MysqlAdapter::PHINX_TYPE_TINY_INTEGER, ['null' => true, 'default' => null, 'comment' => '水印位置:1为左上,2为上中,3为右上,4为左中,5为中间,6为右中,7为左下,8为下中,9为右下']) + ->addColumn('created_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '创建时间']) + ->addColumn('updated_at', 'datetime', ['default' => 'CURRENT_TIMESTAMP', 'comment' => '更新时间']) + ->create(); + } +}