<?php namespace app\common\enum; class ServerEnum extends EnumBasics { // 待付款 10待付款20待指派30待上门40已完成50已取消 const APPLYPAY = 10; // 待派单 const APPLYDISPATCH = 20; // 待服务 const APPLYSERVER = 30; // 已完成 const COMPLETED = 40; // 已取消 const CANCELLED = 50; /** * 获取枚举数据 * @return array */ public static function data(): array { return [ self::APPLYPAY => [ 'name' => '待付款', 'value' => self::APPLYPAY, ], self::APPLYDISPATCH => [ 'name' => '待派单', 'value' => self::APPLYDISPATCH, ], self::APPLYSERVER => [ 'name' => '待服务', 'value' => self::APPLYSERVER, ], self::COMPLETED => [ 'name' => '已完成', 'value' => self::COMPLETED, ], self::CANCELLED => [ 'name' => '已取消', 'value' => self::CANCELLED, ], ]; } }