初始化项目

This commit is contained in:
2026-09-01 22:15:50 +08:00
commit b5a26a8848
11217 changed files with 1710987 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum;
use MyCLabs\Enum\Enum;
/**
* 枚举类基类
* Class Basics
* @package app\common\enum
*/
abstract class EnumBasics extends Enum
{
}
+46
View File
@@ -0,0 +1,46 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum;
/**
* 枚举类:订单类型
* Class OrderType
* @package app\common\enum
*/
class OrderType extends EnumBasics
{
// 商城订单
const ORDER = 10;
// 余额充值订单
const RECHARGE = 100;
/**
* 获取订单类型值
* @return array
*/
public static function data()
{
return [
self::ORDER => [
'name' => '商城订单',
'value' => self::ORDER,
],
self::RECHARGE => [
'name' => '余额充值订单',
'value' => self::RECHARGE,
],
];
}
}
+60
View File
@@ -0,0 +1,60 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum;
/**
* 枚举类:支付类型
* Class PayType
* @package app\common\enum
*/
class PayType extends EnumBasics
{
// 商城订单
const ORDER = 10;
// 余额充值
const RECHARGE = 100;
/**
* 获取订单类型值
* @return array
*/
public static function data()
{
return [
self::ORDER => [
'name' => '商城订单',
'value' => self::ORDER,
],
self::RECHARGE => [
'name' => '余额充值',
'value' => self::RECHARGE,
],
];
}
/**
* 获取订单类型名称
* @return array
*/
public static function getTypeName()
{
static $names = [];
if (empty($names)) {
foreach (self::data() as $item)
$names[$item['value']] = $item['name'];
}
return $names;
}
}
+115
View File
@@ -0,0 +1,115 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum;
/**
* 商城设置枚举类
* Class Setting
* @package app\common\enum
*/
class Setting extends EnumBasics
{
// 配送设置
const DELIVERY = 'delivery';
// 交易设置
const TRADE = 'trade';
// 分销设置
const PROMOTION = 'promotion';
// 短信通知
const SMS = 'sms';
// 上传设置
const STORAGE = 'storage';
// 满额包邮设置
const FULL_FREE = 'full_free';
// 账户注册设置
const REGISTER = 'register';
// 充值设置
const RECHARGE = 'recharge';
// 分享设置
const SHARE = 'share';
// 兑换设置
const EXCHANGE = 'exchange';
// 积分设置
const POINTS = 'points';
// 分类页模板
const PAGE_CATEGORY_TEMPLATE = 'page_category_template';
/**
* 获取订单类型值
* @return array
*/
public static function data(): array
{
return [
self::DELIVERY => [
'value' => self::DELIVERY,
'describe' => '配送设置',
],
self::TRADE => [
'value' => self::TRADE,
'describe' => '交易设置',
],
self::PROMOTION => [
'value' => self::PROMOTION,
'describe' => '分销设置',
],
self::SMS => [
'value' => self::SMS,
'describe' => '短信通知',
],
self::STORAGE => [
'value' => self::STORAGE,
'describe' => '上传设置',
],
self::FULL_FREE => [
'value' => self::FULL_FREE,
'describe' => '满额包邮设置',
],
self::REGISTER => [
'value' => self::REGISTER,
'describe' => '账户注册设置',
],
self::RECHARGE => [
'value' => self::RECHARGE,
'describe' => '充值设置',
],
self::SHARE => [
'value' => self::SHARE,
'describe' => '分享设置',
],
self::EXCHANGE => [
'value' => self::EXCHANGE,
'describe' => '兑换设置',
],
self::POINTS => [
'value' => self::POINTS,
'describe' => '积分设置',
],
self::PAGE_CATEGORY_TEMPLATE => [
'value' => self::PAGE_CATEGORY_TEMPLATE,
'describe' => '分类页模板',
],
];
}
}
@@ -0,0 +1,54 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\comment;
use app\common\enum\EnumBasics;
/**
* 枚举类:商品评价评分类型
* Class Score
* @package app\common\enum\comment
*/
class Score extends EnumBasics
{
// 好评
const GOOD = 10;
// 中评
const MEDIUM = 20;
// 差评
const BAD = 30;
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::GOOD => [
'name' => '好评',
'value' => self::GOOD
],
self::MEDIUM => [
'name' => '中评',
'value' => self::MEDIUM
],
self::BAD => [
'name' => '差评',
'value' => self::BAD
]
];
}
}
@@ -0,0 +1,66 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\company\balanceLog;
use app\common\enum\EnumBasics;
/**
* 余额变动场景枚举类
* Class Scene
* @package app\common\enum\company\balanceLog
*/
class Scene extends EnumBasics
{
// 用户充值
const RECHARGE = 10;
// 用户消费
const CONSUME = 20;
// 管理员操作
const ADMIN = 30;
// 订单退款
const REFUND = 40;
/**
* 获取订单类型值
* @return array
*/
public static function data()
{
return [
self::RECHARGE => [
'name' => '用户充值',
'value' => self::RECHARGE,
'describe' => '用户充值:%s',
],
self::CONSUME => [
'name' => '用户消费',
'value' => self::CONSUME,
'describe' => '用户消费:%s',
],
self::ADMIN => [
'name' => '管理员操作',
'value' => self::ADMIN,
'describe' => '后台管理员 [%s] 操作',
],
self::REFUND => [
'name' => '订单退款',
'value' => self::REFUND,
'describe' => '订单退款:%s',
],
];
}
}
@@ -0,0 +1,55 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\coupon;
use app\common\enum\EnumBasics;
/**
* 枚举类:优惠券适用范围
* Class ApplyRange
* @package app\common\enum\coupon
*/
class ApplyRange extends EnumBasics
{
// 全部商品
const ALL = 10;
// 指定商品
const SOME = 20;
// 排除商品
const EXCLUDE = 30;
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::ALL => [
'name' => '全部商品',
'value' => self::ALL
],
self::SOME => [
'name' => '指定商品',
'value' => self::SOME
],
self::EXCLUDE => [
'name' => '排除商品',
'value' => self::EXCLUDE
]
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\coupon;
use app\common\enum\EnumBasics;
/**
* 枚举类:优惠券类型
* Class CouponType
* @package app\common\enum\coupon
*/
class CouponType extends EnumBasics
{
// 满减券
const FULL_DISCOUNT = 10;
// 折扣券
const DISCOUNT = 20;
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::FULL_DISCOUNT => [
'name' => '满减券',
'value' => self::FULL_DISCOUNT
],
self::DISCOUNT => [
'name' => '折扣券',
'value' => self::DISCOUNT
]
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\coupon;
use app\common\enum\EnumBasics;
/**
* 枚举类:优惠券到期类型
* Class ExpireType
* @package app\common\enum\coupon
*/
class ExpireType extends EnumBasics
{
// 领取后
const RECEIVE = 10;
// 固定时间
const FIXED_TIME = 20;
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::RECEIVE => [
'name' => '领取后',
'value' => self::RECEIVE
],
self::FIXED_TIME => [
'name' => '固定时间',
'value' => self::FIXED_TIME
]
];
}
}
@@ -0,0 +1,57 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\file;
use app\common\enum\EnumBasics;
/**
* 枚举类:文件类型
* Class FileType
* @package app\common\enum\goods
*/
class FileType extends EnumBasics
{
// 图片
const IMAGE = 10;
// 附件
const ANNEX = 20;
// 视频
const VIDEO = 30;
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::IMAGE => [
'name' => '图片',
'value' => self::IMAGE,
],
self::ANNEX => [
'name' => '附件',
'value' => self::ANNEX,
'preview_path' => 'assets/store/img/file_preview/video.png',
],
self::VIDEO => [
'name' => '视频',
'value' => self::VIDEO,
'preview_path' => 'assets/store/img/file_preview/video.png',
],
];
}
}
@@ -0,0 +1,61 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\file;
use app\common\enum\EnumBasics;
/**
* 枚举类:文件存储类型
* Class Storage
* @package app\common\enum\file
*/
class Storage extends EnumBasics
{
// 本地
const LOCAL = 'local';
// 七牛云
const QINIU = 'qiniu';
// 阿里云
const ALIYUN = 'aliyun';
// 腾讯云
const QCLOUD = 'qcloud';
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::LOCAL => [
'name' => '本地',
'value' => self::LOCAL,
],
self::QINIU => [
'name' => '七牛云',
'value' => self::QINIU,
],
self::ALIYUN => [
'name' => '阿里云',
'value' => self::ALIYUN,
],
self::QCLOUD => [
'name' => '腾讯云',
'value' => self::QCLOUD,
],
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\goods;
use app\common\enum\EnumBasics;
/**
* 枚举类:商品库存计算方式
* Class DeductStockType
* @package app\common\enum\goods
*/
class DeductStockType extends EnumBasics
{
// 下单减库存
const CREATE = 10;
// 付款减库存
const PAYMENT = 20;
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::CREATE => [
'name' => '下单减库存',
'value' => self::CREATE,
],
self::PAYMENT => [
'name' => '付款减库存',
'value' => self::PAYMENT,
],
];
}
}
@@ -0,0 +1,47 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\goods;
use app\common\enum\EnumBasics;
/**
* 枚举类:商品规格
* Class SpecType
* @package app\common\enum\goods
*/
class SpecType extends EnumBasics
{
// 单规格
const SINGLE = 10;
// 多规格
const MULTI = 20;
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::SINGLE => [
'name' => '单规格',
'value' => self::SINGLE,
],
self::MULTI => [
'name' => '多规格',
'value' => self::MULTI,
],
];
}
}
@@ -0,0 +1,47 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\goods;
use app\common\enum\EnumBasics;
/**
* 枚举类:商品状态
* Class Status
* @package app\common\enum\goods
*/
class Status extends EnumBasics
{
// 上架
const ON_SALE = 10;
// 下架
const OFF_SALE = 20;
/**
* 获取枚举类型值
* @return array
*/
public static function data()
{
return [
self::ON_SALE => [
'name' => '上架',
'value' => self::ON_SALE,
],
self::OFF_SALE => [
'name' => '下架',
'value' => self::OFF_SALE,
],
];
}
}
@@ -0,0 +1,66 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\merchant\balanceLog;
use app\common\enum\EnumBasics;
/**
* 余额变动场景枚举类
* Class Scene
* @package app\common\enum\merchant\balanceLog
*/
class Scene extends EnumBasics
{
// 用户充值
const RECHARGE = 10;
// 用户消费
const CONSUME = 20;
// 管理员操作
const ADMIN = 30;
// 订单退款
const REFUND = 40;
/**
* 获取订单类型值
* @return array
*/
public static function data()
{
return [
self::RECHARGE => [
'name' => '用户充值',
'value' => self::RECHARGE,
'describe' => '用户充值:%s',
],
self::CONSUME => [
'name' => '用户消费',
'value' => self::CONSUME,
'describe' => '用户消费:%s',
],
self::ADMIN => [
'name' => '管理员操作',
'value' => self::ADMIN,
'describe' => '后台管理员 [%s] 操作',
],
self::REFUND => [
'name' => '订单退款',
'value' => self::REFUND,
'describe' => '订单退款:%s',
],
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order;
use app\common\enum\EnumBasics;
/**
* 枚举类:订单发货状态
* Class DeliveryStatus
* @package app\common\enum\order
*/
class DeliveryStatus extends EnumBasics
{
// 未发货
const NOT_DELIVERED = 10;
// 已发货
const DELIVERED = 20;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::NOT_DELIVERED => [
'name' => '未发货',
'value' => self::NOT_DELIVERED,
],
self::DELIVERED => [
'name' => '已发货',
'value' => self::DELIVERED,
],
];
}
}
@@ -0,0 +1,41 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order;
use app\common\enum\EnumBasics;
/**
* 枚举类:配送方式
* Class DeliveryType
* @package app\common\enum\order
*/
class DeliveryType extends EnumBasics
{
// 快递配送
const EXPRESS = 10;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::EXPRESS => [
'name' => '快递配送',
'value' => self::EXPRESS,
]
];
}
}
@@ -0,0 +1,69 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order;
use app\common\enum\EnumBasics;
/**
* 枚举类:订单场景
* Class OrderScene
* @package app\common\enum\order
*/
class OrderScene extends EnumBasics
{
// 订单创建时
const CREATE = 10;
// 订单付款时
const PAYMENT = 20;
// 订单发货时
const DELIVERY = 30;
// 订单完成时
const COMPLETE = 40;
// 订单取消时
const CANCEL = 50;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::CREATE => [
'name' => '订单创建时',
'value' => self::CREATE,
],
self::PAYMENT => [
'name' => '订单付款时',
'value' => self::PAYMENT,
],
self::DELIVERY => [
'name' => '订单发货时',
'value' => self::DELIVERY,
],
self::COMPLETE => [
'name' => '订单完成时',
'value' => self::COMPLETE,
],
self::CANCEL => [
'name' => '订单取消时',
'value' => self::COMPLETE,
]
];
}
}
@@ -0,0 +1,41 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order;
use app\common\enum\EnumBasics;
/**
* 枚举类:订单来源
* Class OrderSource
* @package app\common\enum\order
*/
class OrderSource extends EnumBasics
{
// 普通订单
const MAIN = 10;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::MAIN => [
'name' => '普通订单',
'value' => self::MAIN,
]
];
}
}
@@ -0,0 +1,62 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order;
use app\common\enum\EnumBasics;
/**
* 枚举类:订单状态
* Class OrderStatus
* @package app\common\enum\order
*/
class OrderStatus extends EnumBasics
{
// 进行中
const NORMAL = 10;
// 已取消
const CANCELLED = 20;
// 待取消
const APPLY_CANCEL = 21;
// 已完成
const COMPLETED = 30;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::NORMAL => [
'name' => '进行中',
'value' => self::NORMAL,
],
self::CANCELLED => [
'name' => '已取消',
'value' => self::CANCELLED,
],
self::APPLY_CANCEL => [
'name' => '待取消',
'value' => self::APPLY_CANCEL,
],
self::COMPLETED => [
'name' => '已完成',
'value' => self::COMPLETED,
],
];
}
}
@@ -0,0 +1,55 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order;
use app\common\enum\EnumBasics;
/**
* 枚举类:订单支付状态
* Class PayStatus
* @package app\common\enum\recharge\order
*/
class PayStatus extends EnumBasics
{
// 待支付
const PENDING = 10;
// 支付成功
const SUCCESS = 20;
// 超时
const CANCEL = 30;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::PENDING => [
'name' => '等待支付',
'value' => self::PENDING,
],
self::SUCCESS => [
'name' => '支付成功',
'value' => self::SUCCESS,
],
self::CANCEL => [
'name' => '支付超时',
'value' => self::CANCEL,
],
];
}
}
@@ -0,0 +1,55 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order;
use app\common\enum\EnumBasics;
/**
* 枚举类:订单支付方式
* Class PayType
* @package app\common\enum\order
*/
class PayType extends EnumBasics
{
// 余额支付
const BALANCE = 10;
// 微信支付
const WECHAT = 20;
// 转账支付
const TRANSFER = 30;
/**
* 获取枚举数据
* @return array
*/
public static function data(): array
{
return [
self::BALANCE => [
'name' => '余额支付',
'value' => self::BALANCE,
],
self::WECHAT => [
'name' => '微信支付',
'value' => self::WECHAT,
],
self::TRANSFER => [
'name' => '转账支付',
'value' => self::TRANSFER,
],
];
}
}
@@ -0,0 +1,47 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order;
use app\common\enum\EnumBasics;
/**
* 枚举类:订单收货状态
* Class ReceiptStatus
* @package app\common\enum\order
*/
class ReceiptStatus extends EnumBasics
{
// 未收货
const NOT_RECEIVED = 10;
// 已收货
const RECEIVED = 20;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::NOT_RECEIVED => [
'name' => '未收货',
'value' => self::NOT_RECEIVED,
],
self::RECEIVED => [
'name' => '已收货',
'value' => self::RECEIVED,
],
];
}
}
@@ -0,0 +1,54 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order\export;
use app\common\enum\EnumBasics;
/**
* 枚举类:导出状态
* Class ExportStatus
* @package app\common\enum\order\export
*/
class ExportStatus extends EnumBasics
{
// 进行中
const NORMAL = 10;
// 已完成
const COMPLETED = 20;
// 失败
const FAIL = 30;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::NORMAL => [
'name' => '进行中',
'value' => self::NORMAL,
],
self::COMPLETED => [
'name' => '已完成',
'value' => self::COMPLETED,
],
self::FAIL => [
'name' => '失败',
'value' => self::FAIL,
]
];
}
}
@@ -0,0 +1,55 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order\refund;
use app\common\enum\EnumBasics;
/**
* 枚举类:商家审核状态
* Class AuditStatus
* @package app\common\enum\order
*/
class AuditStatus extends EnumBasics
{
// 待审核
const WAIT = 0;
// 已同意
const REVIEWED = 10;
// 已拒绝
const REJECTED = 20;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::WAIT => [
'name' => '待审核',
'value' => self::WAIT
],
self::REVIEWED => [
'name' => '已同意',
'value' => self::REVIEWED
],
self::REJECTED => [
'name' => '已拒绝',
'value' => self::REJECTED
]
];
}
}
@@ -0,0 +1,62 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order\refund;
use app\common\enum\EnumBasics;
/**
* 枚举类:售后单状态
* Class RefundStatus
* @package app\common\enum\order
*/
class RefundStatus extends EnumBasics
{
// 进行中
const NORMAL = 0;
// 已拒绝
const REJECTED = 10;
// 已完成
const COMPLETED = 20;
// 已取消
const CANCELLED = 30;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::NORMAL => [
'name' => '进行中',
'value' => self::NORMAL,
],
self::REJECTED => [
'name' => '已拒绝',
'value' => self::REJECTED,
],
self::COMPLETED => [
'name' => '已完成',
'value' => self::COMPLETED,
],
self::CANCELLED => [
'name' => '已取消',
'value' => self::CANCELLED,
]
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\order\refund;
use app\common\enum\EnumBasics;
/**
* 枚举类:售后类型
* Class RefundType
* @package app\common\enum\order
*/
class RefundType extends EnumBasics
{
// 退货退款
const RETURN = 10;
// 换货
const EXCHANGE = 20;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::RETURN => [
'name' => '退货退款',
'value' => self::RETURN
],
self::EXCHANGE => [
'name' => '换货',
'value' => self::EXCHANGE
]
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\page;
use app\common\enum\EnumBasics;
/**
* 枚举类:订单支付方式
* Class PageType
* @package app\common\enum\order
*/
class PageType extends EnumBasics
{
// 首页
const HOME = 10;
// 自定义页
const CUSTOM = 20;
/**
* 获取枚举数据
* @return array
*/
public static function data()
{
return [
self::HOME => [
'name' => '首页',
'value' => self::HOME
],
self::CUSTOM => [
'name' => '自定义页',
'value' => self::CUSTOM
]
];
}
}
@@ -0,0 +1,66 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\partners\balanceLog;
use app\common\enum\EnumBasics;
/**
* 余额变动场景枚举类
* Class Scene
* @package app\common\enum\partners\balanceLog
*/
class Scene extends EnumBasics
{
// 用户充值
const RECHARGE = 10;
// 用户消费
const CONSUME = 20;
// 管理员操作
const ADMIN = 30;
// 订单退款
const REFUND = 40;
/**
* 获取订单类型值
* @return array
*/
public static function data()
{
return [
self::RECHARGE => [
'name' => '用户充值',
'value' => self::RECHARGE,
'describe' => '用户充值:%s',
],
self::CONSUME => [
'name' => '用户消费',
'value' => self::CONSUME,
'describe' => '用户消费:%s',
],
self::ADMIN => [
'name' => '管理员操作',
'value' => self::ADMIN,
'describe' => '后台管理员 [%s] 操作',
],
self::REFUND => [
'name' => '订单退款',
'value' => self::REFUND,
'describe' => '订单退款:%s',
],
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\recharge\order;
use app\common\enum\EnumBasics;
/**
* 用户充值订单-支付状态枚举类
* Class PayStatus
* @package app\common\enum\recharge\order
*/
class PayStatus extends EnumBasics
{
// 待支付
const PENDING = 10;
// 支付成功
const SUCCESS = 20;
/**
* 获取订单类型值
* @return array
*/
public static function data()
{
return [
self::PENDING => [
'name' => '未支付',
'value' => self::PENDING,
],
self::SUCCESS => [
'name' => '已支付',
'value' => self::SUCCESS,
],
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\recharge\order;
use app\common\enum\EnumBasics;
/**
* 用户充值订单-充值方式枚举类
* Class RechargeType
* @package app\common\enum\recharge\order
*/
class RechargeType extends EnumBasics
{
// 自定义金额
const CUSTOM = 10;
// 套餐充值
const PLAN = 20;
/**
* 获取订单类型值
* @return array
*/
public static function data()
{
return [
self::CUSTOM => [
'name' => '自定义金额',
'value' => self::CUSTOM,
],
self::PLAN => [
'name' => '套餐充值',
'value' => self::PLAN,
],
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\setting\sms;
use app\common\enum\EnumBasics;
/**
* 枚举类: 短信通知场景
* Class Scene
* @package app\common\enum\setting\sms
*/
class Scene extends EnumBasics
{
// 短信验证码
const CAPTCHA = 'captcha';
// 新付款订单
const ORDER_PAY = 'order_pay';
/**
* 获取类型值
* @return array
*/
public static function data()
{
return [
self::CAPTCHA => [
'name' => '短信验证码',
'value' => self::CAPTCHA
],
self::ORDER_PAY => [
'name' => '新付款订单',
'value' => self::ORDER_PAY
]
];
}
}
@@ -0,0 +1,48 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\store\address;
use app\common\enum\EnumBasics;
/**
* 枚举类:地址类型
* Class Type
* @package app\common\enum\store\address
*/
class Type extends EnumBasics
{
// 发货地址
const DELIVERY = 10;
// 退货地址
const RETURN = 20;
/**
* 获取类型值
* @return array
*/
public static function data()
{
return [
self::DELIVERY => [
'name' => '发货地址',
'value' => self::DELIVERY,
],
self::RETURN => [
'name' => '退货地址',
'value' => self::RETURN
]
];
}
}
@@ -0,0 +1,61 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\store\page\category;
use app\common\enum\EnumBasics;
/**
* 枚举类:分类页模板样式
* Class Style
* @package app\common\enum\store\page\category
*/
class Style extends EnumBasics
{
// 一级分类[大图]
const ONE_LEVEL_BIG = 10;
// 一级分类[小图]
const ONE_LEVEL_SMALL = 11;
// 一级分类+二级分类
const TWO_LEVEL = 20;
// 分类+商品
const COMMODITY = 30;
/**
* 获取类型值
* @return array
*/
public static function data(): array
{
return [
self::ONE_LEVEL_BIG => [
'name' => '一级分类[大图]',
'value' => self::ONE_LEVEL_BIG,
],
self::ONE_LEVEL_SMALL => [
'name' => '一级分类[小图]',
'value' => self::ONE_LEVEL_SMALL
],
self::TWO_LEVEL => [
'name' => '二级分类',
'value' => self::TWO_LEVEL
],
self::COMMODITY => [
'name' => '分类+商品',
'value' => self::COMMODITY
]
];
}
}
@@ -0,0 +1,82 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\user\balanceLog;
use app\common\enum\EnumBasics;
/**
* 余额变动场景枚举类
* Class Scene
* @package app\common\enum\user\balanceLog
*/
class Scene extends EnumBasics
{
// 用户充值
const RECHARGE = 10;
// 用户消费
const CONSUME = 20;
// 管理员操作
const ADMIN = 30;
// 订单退款
const REFUND = 40;
// 用户分销
const SHARE = 50;
// 实体卡兑换
const EXCHANGE = 60;
/**
* 获取订单类型值
* @return array
*/
public static function data()
{
return [
self::RECHARGE => [
'name' => '用户充值',
'value' => self::RECHARGE,
'describe' => '用户充值:%s',
],
self::CONSUME => [
'name' => '用户消费',
'value' => self::CONSUME,
'describe' => '用户消费:%s',
],
self::ADMIN => [
'name' => '管理员操作',
'value' => self::ADMIN,
'describe' => '后台管理员 [%s] 操作',
],
self::REFUND => [
'name' => '订单退款',
'value' => self::REFUND,
'describe' => '订单退款:%s',
],
self::SHARE => [
'name' => '用户分销',
'value' => self::SHARE,
'describe' => '用户分销:%s',
],
self::EXCHANGE => [
'name' => '实体卡兑换',
'value' => self::EXCHANGE,
'describe' => '实体卡兑换:%s',
],
];
}
}
@@ -0,0 +1,30 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
declare (strict_types=1);
namespace app\common\enum\user\grade\log;
use app\common\enum\EnumBasics;
/**
* 会员等级变更记录表 -> 变更类型
* Class ChangeType
* @package app\common\enum\user\grade\log
*/
class ChangeType extends EnumBasics
{
// 后台管理员设置
const ADMIN_USER = 10;
// 自动升级
const AUTO_UPGRADE = 20;
}