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(); } }