123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration
- {
- /**
- * Run the migrations.
- */
- public function up(): void
- {
- Schema::create('service_project', function (Blueprint $table) {
- $table->comment('服务项目表');
- $table->id();
- $table->string('title')->comment('标题');
- $table->string('sub_title')->comment('副标题');
- $table->string('cover')->nullable()->comment('封面图');
- $table->double('price')->default(0.00)->nullable()->comment('价格');
- $table->double('init_price')->default(0.00)->nullable()->comment('原价');
- $table->integer('sale')->default(0)->nullable()->comment('销量');
- $table->integer('true_sale')->default(0)->nullable()->comment('实际销量');
- $table->integer('total_sale')->default(0)->nullable()->comment('总销量');
- $table->integer('time_long')->default(0)->nullable()->comment('服务时长');
- $table->integer('max_time')->default(0)->nullable()->comment('最长预约');
- $table->text('introduce')->nullable()->comment('介绍');
- $table->text('explain')->nullable()->comment('说明');
- $table->text('notice')->nullable()->comment('须知');
- $table->string('sort')->default(0)->comment('分类排序');
- $table->tinyInteger('status')->default(0)->comment('账户状态 (0正常 1停用)');
- $table->tinyInteger('com_balance')->default(0)->comment('分佣比例');
- $table->tinyInteger('is_add')->default(0)->comment('是否加钟服务');
- $table->double('material_price')->default(0.00)->nullable()->comment('物料费');
- $table->tinyInteger('is_store')->default(0)->comment('是否支持到店');
- $table->tinyInteger('is_door')->default(1)->comment('是否支持上门');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('service_project');
- }
- };
|