id(); $table->string('name')->comment('模板名称'); $table->enum('platform', ['common', 'jd', 'pdd', 'taobao'])->default('common')->comment('平台'); $table->string('size')->comment('尺寸'); $table->text('style')->comment('样式内容'); $table->string('default_express')->nullable()->comment('默认快递公司'); $table->string('sender_name')->comment('发件人姓名'); $table->string('sender_phone')->comment('发件人电话'); $table->string('sender_address')->comment('发件人地址'); $table->boolean('show_product')->default(true)->comment('是否显示商品明细'); $table->text('remark')->nullable()->comment('备注'); $table->timestamps(); $table->softDeletes(); $table->index('platform'); $table->index('name'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('templates'); } };