table('key_personnel', ['engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '重点人员档案' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); $table->addColumn('name', 'string', ['limit' => 20,'null' => true,'signed' => true,'comment' => '姓名',]) ->addColumn('gender', 'boolean', ['null' => true,'signed' => true,'comment' => '性别',]) ->addColumn('card_type', 'string', ['limit' => 16,'null' => true,'signed' => true,'comment' => '证件类型',]) ->addColumn('card_number', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '证件号码',]) ->addColumn('address', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '地址',]) ->addColumn('guardians_name', 'string', ['limit' => 20,'null' => true,'signed' => true,'comment' => '监护人姓名',]) ->addColumn('guardians_gender', 'boolean', ['null' => true,'signed' => true,'comment' => '监护人性别',]) ->addColumn('guardians_phone', 'string', ['limit' => 28,'null' => true,'signed' => true,'comment' => '监护人联系电话',]) ->addColumn('guardians_address', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '监护人地址',]) ->addColumn('rfid_sn', 'string', ['limit' => 32,'null' => false,'signed' => false,'comment' => '标签ID',]) ->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' => '更新时间',]) ->addColumn('deleted_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '软删除',]) ->create(); } }