<?php

namespace app\api\controller;

use app\api\lists\FirmGoodLists;
use app\api\lists\recharge\FirmOrderLists;
use app\api\logic\FirmLogic;
use app\api\logic\GoodsLogic;
use app\api\logic\UserLogic;
use app\api\validate\FirmRegisterValidate;
use app\api\validate\FirmValidate;
use app\api\validate\GoodsValidate;

class FirmController extends BaseApiController
{
    public array $notNeedLogin = [];

    /**
     * 企业注册
     * @return \think\response\Json
     * @author 林海涛
     * @date 2024/7/12 下午2:17
     */
    public function register()
    {
        $params = (new FirmRegisterValidate())->post()->goCheck('register');
        $result = FirmLogic::register($params,$this->userId);
        if (true === $result) {
            return $this->success('已提交', [], 1, 1);
        }
        return $this->fail(FirmLogic::getError());
    }
}