<?php

namespace app\common\enum\store;

use app\common\enum\CommonEnum;

class StoreOrderEnum extends CommonEnum
{
    const IS_DEL = parent::IS_DEL;

    const IS_SYSTEM_DEL = parent::IS_DEL;

    // 配送方式
    const DISTRIBUTION_MODE = [
        'ExpressDelivery' => ['code' => 1, 'name' => '快递'],
        'Self-Pickup' => ['code' => 2, 'name' => '自提'],
        'MerchantDelivery' => ['code' => 3, 'name' => '配送']
    ];

    // 订单类型
    const DOHUOMALL = [
        'PlatformOrder' => ['code' => 0, 'name' => '平台订单'],
        'SupplyChainOrder' => ['code' => 1, 'name' => '供应链订单']
    ];

    // 供应链订单状态
    const DOHUOMALL_STATUS = [
        'Failed' => ['code' => 0, 'name' => '失败'],
        'PendingPayment' => ['code' => 1, 'name' => '待付款'],
        'PendingShipment' => ['code' => 2, 'name' => '待发货'],
        'PendingReceipt' => ['code' => 3, 'name' => '待收货'],
        'Completed' => ['code' => 4, 'name' => '已完成'],
        'Cancelled' => ['code' => 5, 'name' => '已取消'],
        'InAfterSale' => ['code' => 6, 'name' => '售后中'],
        'AfterSaleCompleted' => ['code' => 7, 'name' => '售后完成'],
        'Rejected' => ['code' => 8, 'name' => '拒收'],
        'NotSubmittedToWeiweiBao' => ['code' => 9, 'name' => '还未提交到微唯保']
    ];

    // 组合支付类型 （考虑到这个区分 A或B 在此步骤毫无意义，划分混乱） A：会员专区 B：精彩生活区 C：复购区
    const FZONE_PAY_TYPE = [
        'B1-VR+Score' => ['code' => 'b1', 'name' => 'VR+积分'],
        'B2-Cash+Score' => ['code' => 'b2', 'name' => '现金+积分'],
        'B3-VR+Jingdou' => ['code' => 'b3', 'name' => 'VR+京豆'],
        'B4-Cash+Jingdou' => ['code' => 'b4', 'name' => '现金+京豆'],
        'B5-VR' => ['code' => 'b5', 'name' => 'VR'],
        'B6-Cash' => ['code' => 'b6', 'name' => '现金'],
        'A1-VR' => ['code' => 'a1', 'name' => 'VR'],
        'A2-Cash' => ['code' => 'a2', 'name' => '现金'],
        'A3-Cash+VR' => ['code' => 'a3', 'name' => '现金+VR'],
        'C1-Fugou' => ['code' => 'c1', 'name' => '复购金'],
    ];

    // 订单状态
    const STATUS = [
        'WAITING_SHIPMENT' => ['code' => 0, 'name' => '待发货'],
        'WAITING_RECEIVE' => ['code' => 1, 'name' => '待收货'],
        'WAITING_EVALUATION' => ['code' => 2, 'name' => '待评价'],
        'COMPLETED' => ['code' => 3, 'name' => '已完成'],
        'REFUND_REQUESTED' => ['code' => 4, 'name' => '已申请退款'],
        'REFUNDED' => ['code' => -1, 'name' => '已退款'],
        'UNPAID' => ['code' => 5, 'name' => '未支付'],
        'CANCELLED' => ['code' => 6, 'name' => '已取消'],
    ];

    // 支付状态
    const PAID_STATUS = [
        'UNPAID' => ['code' => 0, 'name' => '未支付'],
        'PAID' => ['code' => 1, 'name' => '已支付'],
    ];

    // 支付方式
    const PAY_TYPE = [
        'BALANCE' => ['code' => 0, 'name' => '余额支付'],
        'WECHAT' => ['code' => 1, 'name' => '微信支付'],
        'MINI_PROGRAM' => ['code' => 2, 'name' => '小程序支付'],
        'ALIPAY' => ['code' => 4, 'name' => '支付宝支付'],
        'SPECIAL_MERCHANT_POINTS' => ['code' => 5, 'name' => '特殊商户积分'],
    ];

    // 订单类型
    const ORDER_TYPE = [
        'ORDINARY' => ['code' => 0, 'name' => '普通订单'],
        'PICKUP' => ['code' => 1, 'name' => '自提订单'],
    ];

    // 发货类型
    const DELIVERY_TYPE = [
        'DELIVERY' => ['code' => 1, 'name' => '发货'],
        'DELIVERY_PERSON' => ['code' => 2, 'name' => '送货'],
        'VIRTUAL' => ['code' => 3, 'name' => '虚拟商品'],
    ];

    // 是否分账
    const IS_INDEPENDENT_ACCOUNT = [
        'NO' => ['code' => 0, 'name' => '否'],
        'YES' => ['code' => 1, 'name' => '是'],
    ];

    // 退款状态
    const REFUND_STATUS = [
        'WAITING_REVIEW' => ['code' => 0, 'name' => '待审核'],
        'REVIEW_FAILED' => ['code' => -1, 'name' => '审核未通过'],
        'WAITING_RETURN' => ['code' => 1, 'name' => '待退货'],
        'WAITING_RECEIVE' => ['code' => 2, 'name' => '待收货'],
        'REFUNDED' => ['code' => 3, 'name' => '已退款'],
    ];

    // 支付状态
    const PAID = [
        'NO' => ['code' => 0, 'name' => '未支付'],
        'YES' => ['code' => 1, 'name' => '已支付'],
    ];

    // 是否已结算 is_settlement
    const IS_SETTLEMENT = [
        'NO' => ['code' => 0, 'name' => '未结算'],
        'YES' => ['code' => 1, 'name' => '已结算'],
    ];
}