|
@@ -1,4 +1,12 @@
|
|
|
<?php
|
|
|
+/*
|
|
|
+ * @Descripttion:
|
|
|
+ * @version: 1.0.0
|
|
|
+ * @Author: likang
|
|
|
+ * @Date: 2022-05-27 13:34:31
|
|
|
+ * @LastEditors: likang
|
|
|
+ * @LastEditTime: 2022-06-21 16:46:12
|
|
|
+ */
|
|
|
|
|
|
use think\migration\Migrator;
|
|
|
use think\migration\db\Column;
|
|
@@ -31,29 +39,19 @@ class Wrench extends Migrator
|
|
|
{
|
|
|
$table = $this->table('wrench', ['engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '液压扳手' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]);
|
|
|
$table->addColumn('number', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '编号',])
|
|
|
- ->addColumn('model', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '型号',])
|
|
|
->addColumn('department_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '所属部门',])
|
|
|
- ->addColumn('name', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '名称',])
|
|
|
- ->addColumn('is_used', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '使用状态',])
|
|
|
- ->addColumn('brand', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '品牌',])
|
|
|
- ->addColumn('supplier', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '供应商',])
|
|
|
- ->addColumn('out_date', 'date', ['null' => true,'signed' => true,'comment' => '出厂日期',])
|
|
|
+ ->addColumn('eq_id', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '设备id',])
|
|
|
->addColumn('remark', 'string', ['limit' => 256,'null' => true,'signed' => true,'comment' => '备注',])
|
|
|
->addColumn('alarm_state', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '告警状态',])
|
|
|
->addColumn('net_state', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '网络状态',])
|
|
|
->addColumn('online_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '在线时间',])
|
|
|
- ->addColumn('max_pressure', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '最大压力',])
|
|
|
- ->addColumn('min_pressure', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '最小压力',])
|
|
|
+ ->addColumn('pressure', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '压力',])
|
|
|
->addColumn('angle_sensor', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '角度传感器',])
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
->addColumn('checked_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '校验时间',])
|
|
|
->addColumn('checked_no', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '校验台编号',])
|
|
|
->addColumn('checked_res', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '校验结果',])
|
|
|
->addColumn('checked_user_id', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '操作员',])
|
|
|
- ->addColumn('max_torque', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '最大扭矩',])
|
|
|
- ->addColumn('min_torque', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '最小扭矩',])
|
|
|
+ ->addColumn('torque', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '扭矩',])
|
|
|
->addColumn('creator_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建人ID',])
|
|
|
->addColumn('created_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',])
|
|
|
->addColumn('updated_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',])
|