价格增加百分比上浮
This commit is contained in:
@@ -42,6 +42,7 @@ return new class extends Migration
|
||||
$table->integer('shelf_life')->default(0)->comment('保质期');
|
||||
$table->integer('stock')->default(0)->comment('库存');
|
||||
$table->integer('status')->default(1)->comment('状态(1上架 0下架)');
|
||||
$table->decimal('cost_price', 10, 2)->default(0)->comment('成本价(元,成本百分比计价基数)');
|
||||
$table->string('remark', 255)->default('')->comment('备注');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
@@ -57,7 +58,9 @@ return new class extends Migration
|
||||
$table->increments('id')->comment('价格ID');
|
||||
$table->integer('product_id')->comment('商品ID');
|
||||
$table->integer('level_id')->comment('客户等级ID');
|
||||
$table->decimal('price', 10, 2)->default(0)->comment('该等级下的商品单价');
|
||||
$table->decimal('price', 10, 2)->default(0)->comment('该等级下的商品单价(固定价=实际单价;百分比=等价固定价)');
|
||||
$table->unsignedTinyInteger('price_type')->default(0)->comment('计价类型(0固定价 1成本百分比)');
|
||||
$table->decimal('percent', 5, 2)->default(0)->comment('成本上浮百分点(如 30 = 上浮30%,仅 price_type=1 生效)');
|
||||
$table->timestamps();
|
||||
$table->unique(['product_id', 'level_id'], 'product_price_product_level_unique');
|
||||
$table->comment('商品等级价格表');
|
||||
|
||||
Reference in New Issue
Block a user