Files
water_new/modules/Mall/Config/config.php
2023-03-08 09:16:04 +08:00

169 lines
5.6 KiB
PHP

<?php
return [
/*
|--------------------------------------------------------------------------
| 模块名称
|--------------------------------------------------------------------------
*/
'name' => 'Mall',
/*
|--------------------------------------------------------------------------
| 订单编号计数器位数,取值范围 6 - 16
|--------------------------------------------------------------------------
*/
'order_no_counter_length' => 8,
/*
|--------------------------------------------------------------------------
| 退款单编号前缀
|--------------------------------------------------------------------------
*/
'refund_no_counter_prefix' => 'RF',
/*
|--------------------------------------------------------------------------
| 退款单编号计数器位数,取值范围 6 - 16 - 退款编号前缀位数
|--------------------------------------------------------------------------
*/
'refund_no_counter_length' => 6,
/*
|--------------------------------------------------------------------------
| 商品规格的扩展属性
|--------------------------------------------------------------------------
*/
'sku_extends_attributes' => [
'market_fee' => '平台手续费',
],
'administrator_max_id' => 10000,
'workflow' => [
'orders' => [
'type' => 'state_machine',
'marking_store' => [
'type' => 'single_state',
'property' => 'currentState',
],
'supports' => [Modules\Mall\Models\Order::class],
'places' => [
'INIT',
'CANCEL',
'PAID',
'DELIVERED',
'SIGNED',
'COMPLETED',
'REFUND_APPLY',
'REFUND_AGREE',
'REFUND_REFUSE',
'REFUND_DELIVER',
'REFUND_DELIVERD',
'REFUND_PROCESS',
'REFUND_COMPLETED',
],
'transitions' => [
'cancel' => [
'from' => ['INIT', 'PAID'],
'to' => 'CANCEL',
],
'pay' => [
'from' => 'INIT',
'to' => 'PAID',
],
'deliver' => [
'from' => 'PAID',
'to' => 'DELIVERED',
],
'sign' => [
'from' => 'DELIVERED',
'to' => 'SIGNED',
],
'complete' => [
'from' => 'SIGNED',
'to' => 'COMPLETED',
],
'refund' => [
'from' => ['PAID', 'SIGNED'],
'to' => 'REFUND_APPLY',
],
'agree' => [
'from' => ['PAID', 'SIGNED', 'REFUND_APPLY'],
'to' => 'REFUND_AGREE',
],
'refuse' => [
'from' => 'REFUND_APPLY',
'to' => 'REFUND_REFUSE',
],
'user_deliver' => [
'from' => 'REFUND_AGREE',
'to' => 'REFUND_DELIVER',
],
'user_deliverd' => [
'from' => 'REFUND_DELIVER',
'to' => 'REFUND_DELIVERD',
],
'process' => [
'from' => ['REFUND_AGREE', 'REFUND_DELIVERD'],
'to' => 'REFUND_PROCESS',
],
'completed' => [
'from' => ['PAID', 'DELIVERED', 'SIGNED', 'REFUND_PROCESS', 'REFUND_DELIVERD'],
'to' => 'REFUND_COMPLETED',
],
],
],
'refunds' => [
'type' => 'state_machine',
'marking_store' => [
'type' => 'single_state',
'property' => 'currentState',
],
'supports' => [Modules\Mall\Models\Refund::class],
'places' => [
'REFUND_APPLY',
'REFUND_AGREE',
'REFUND_REFUSE',
'REFUND_PROCESS',
'REFUND_DELIVER',
'REFUND_DELIVERED',
'REFUND_SIGNED',
'REFUND_COMPLETED',
],
'transitions' => [
'agree' => [
'from' => 'REFUND_APPLY',
'to' => 'REFUND_AGREE',
],
'refuse' => [
'from' => 'REFUND_APPLY',
'to' => 'REFUND_REFUSE',
],
'deliver' => [
'from' => 'REFUND_AGREE',
'to' => 'REFUND_DELIVER',
],
'delivered' => [
'from' => 'REFUND_DELIVER',
'to' => 'REFUND_DELIVERED',
],
'sign' => [
'from' => 'REFUND_DELIVERED',
'to' => 'REFUND_SIGNED',
],
'process' => [
'from' => ['REFUND_AGREE', 'REFUND_SIGNED'],
'to' => 'REFUND_PROCESS',
],
'completed' => [
'from' => 'REFUND_PROCESS',
'to' => 'REFUND_COMPLETED',
],
],
],
],
];