Commit 25073c05 authored by 王源's avatar 王源
Browse files

调整文件目录结构

parent 1b77f70a
Loading
Loading
Loading
Loading

src/CategoryInterface.php

deleted100644 → 0
+0 −29
Original line number Diff line number Diff line
<?php
/**
 * Created by PhpStorm.
 * UserInterface: 梁俊杰
 * Date: 2019/11/18
 * Time: 17:15
 * Description:
 */
namespace  Meibuyu\Micro;
interface CategoryInterface
{
    /**
     * 新增品类
     * @param array $attribute
     * @return bool
     */
    public function add($attribute);

    /**
     * 更新品类
     * @param array $attribute
     * @param int $id
     * @return bool
     */
    public function update($attribute, $id);


    public function delete($id);
}

src/DepartmentInterface.php

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
<?php
/**
 * Created by PhpStorm.
 * User: 梁俊杰
 * Date: 2019/11/19
 * Time: 08:44
 * Description:
 */

namespace Meibuyu\Micro;


interface DepartmentInterface
{

}

src/FactoryInterface.php

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
<?php
/**
 * Created by PhpStorm.
 * User: 梁俊杰
 * Date: 2019/11/19
 * Time: 08:43
 * Description:
 */

namespace Meibuyu\Micro;


interface FactoryInterface
{

}

src/Helper.php

0 → 100644
+59 −0
Original line number Diff line number Diff line
<?php
/**
 * Created by PhpStorm.
 * User: 梁俊杰
 * Date: 2019/12/03
 * Time: 16:08
 * Description:
 */

namespace Meibuyu\Micro;

class Helper
{
    /**
     * 获取唯一编号
     * @param string $prefix
     * @return string
     */
    public static function uid($prefix = '')
    {
        return uniqid($prefix);
    }

    /**
     * 返回成功消息
     * @param array|string $data 返回数据 默认空
     * @param string $msg 消息,默认 Success
     * @param int $code 成功代码,默认200
     * @return array
     */
    public static function success($data = '', $msg = 'success', $code = 200)
    {
        return self::response($data, $msg, $code);
    }

    /**
     * 返回失败消息
     * @param array|string $data 返回数据 默认空
     * @param string $msg 消息,默认 Error
     * @param int $code 失败代码,默认400
     * @return array
     */
    public static function fail($data = '', $msg = 'fail', $code = 400)
    {
        return self::response($data, $msg, $code);
    }

    /**
     * 返回操作消息
     * @param array|string $data 返回数据 默认空
     * @param string $msg 消息,默认空
     * @param int $code 操作代码,默认200
     * @return array
     */
    public static function response($data = '', $msg = '', $code = 200)
    {
        return ['data' => $data, 'msg' => $msg, 'code' => $code];
    }
}

src/LogisticsInterface.php

deleted100644 → 0
+0 −16
Original line number Diff line number Diff line
<?php
/**
 * Created by PhpStorm.
 * User: 梁俊杰
 * Date: 2019/11/19
 * Time: 08:42
 * Description:
 */

namespace Meibuyu\Micro;


interface LogisticsInterface
{

}
Loading