<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\DB;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        DB::statement("CREATE TABLE `ufutx_s2_shop_advertisement` (
  `id` int(10) UNSIGNED PRIMARY KEY NOT NULL AUTO_INCREMENT,
  `pos` tinyint(3) UNSIGNED NOT NULL COMMENT '位置,1=首页轮播banner',
  `icon` varchar(256) DEFAULT NULL COMMENT 'icon',
  `banner` varchar(256) DEFAULT NULL COMMENT 'banner',
  `title` varchar(128) DEFAULT NULL COMMENT '文本',
  `spu_id` bigint(20) DEFAULT NULL COMMENT '目标商品',
  `category_id` bigint(20) DEFAULT NULL COMMENT '目标分类',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='商城广告位配置';");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('s2_shop_advertisement');
    }
};
