From a8c98a0a05b826888d91a9ccb2a386b5b23499cb Mon Sep 17 00:00:00 2001 From: wuyanwen Date: Sat, 25 Jan 2020 22:22:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=99=84=E4=BB=B6=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/20200125133249_attachments.php | 43 +++++++++++++++++++ catch/system/model/Attachments.php | 22 ++++++++++ 2 files changed, 65 insertions(+) create mode 100644 catch/system/database/migrations/20200125133249_attachments.php create mode 100644 catch/system/model/Attachments.php diff --git a/catch/system/database/migrations/20200125133249_attachments.php b/catch/system/database/migrations/20200125133249_attachments.php new file mode 100644 index 0000000..1395114 --- /dev/null +++ b/catch/system/database/migrations/20200125133249_attachments.php @@ -0,0 +1,43 @@ +table('attachments',['engine'=>'Myisam', 'comment' => '附件管理', 'signed' => false]); + $table->addColumn('path', 'string',['limit' => 50,'default'=>'','comment'=>'附件存储路径']) + ->addColumn('mime_type', 'string',['default'=> '', 'limit' => 100, 'comment'=>'资源mimeType']) + ->addColumn('file_ext', 'string',['default'=> '','limit' => 100, 'comment'=>'资源后缀']) + ->addColumn('file_size', 'integer',['default'=> 0, 'comment'=>'资源大小']) + ->addColumn('filename', 'string',['default'=>'', 'limit' => 255, 'comment'=>'资源名称']) + ->addColumn('driver', 'string',['default'=> 0, 'limit' => 20, 'comment' => 'local,oss,qcloud,qiniu']) + ->addColumn('created_at', 'integer', array('default'=>0, 'comment'=>'创建时间', 'signed' => false )) + ->addColumn('updated_at', 'integer', array('default'=>0, 'comment'=>'更新时间', 'signed' => false )) + ->addColumn('deleted_at', 'integer', array('default'=>0, 'comment'=>'删除时间', 'signed' => false )) + ->create(); + } +} diff --git a/catch/system/model/Attachments.php b/catch/system/model/Attachments.php new file mode 100644 index 0000000..ff84582 --- /dev/null +++ b/catch/system/model/Attachments.php @@ -0,0 +1,22 @@ +