You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: auth_logic.go
    path of file: ./repos/teamgram-server/app/bff/authorization/internal/logic
    
    the code of the file until where you have to start completion: // Copyright 2022 Teamgram Authors
//  All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Author: teamgramio (teamgram.io@gmail.com)
//

package logic

import (
	"context"
	"time"

	"github.com/teamgram/proto/mtproto"
	"github.com/teamgram/teamgram-server/app/bff/authorization/internal/dao"
	"github.com/teamgram/teamgram-server/app/bff/authorization/internal/model"
	"github.com/teamgram/teamgram-server/pkg/code"
	"github.com/zeromicro/go-zero/core/logx"
)

type AuthLogic struct {
	*dao.Dao
	code.VerifyCodeInterface
}

func NewAuthSignLogic(dao *dao.Dao, code2 code.VerifyCodeInterface) *AuthLogic {
	return &AuthLogic{
		Dao:                 dao,
		VerifyCodeInterface: code2,
	}
}

func (m *AuthLogic) DoAuthSendCode(
	ctx context.Context,
	authKeyId int64,
	sessionId int64,
	phoneNumber string,
	phoneRegistered,
	allowFlashCall,
	currentNumber bool,
	apiId int32,
	apiHash string,
	cb func(codeData *model.Phone
    
func (m *AuthLogic) DoAuthSignUp(ctx context.Context, authKeyId int64, phoneNumber string, phoneCode *string, phoneCodeHash string) (codeData *model.PhoneCodeTransaction, err error) {
	if codeData, err = m.Dao.GetPhoneCode(ctx, authKeyId, phoneNumber, phoneCodeHash); err != nil {
		return
	}

	// TODO(@benqi): 重复请求处理...
	// check state invalid.
	// TODO(@benqi): remote client error, state is Ok
	if codeData.State != model.CodeStateOk &&
		codeData.State != model.CodeStateSignIn &&
		codeData.State != model.CodeStateDeleted &&
		codeData.State != model.CodeStateSignUp {
		err = mtproto.ErrInputRequestInvalid
		logx.WithContext(ctx).Errorf("invalid code state(%d) - err: %v", codeData.State, err)
		return
	}

	now := int32(time.Now().Unix())
	if now > codeData.PhoneCodeExpired {
		// TODO(@benqi): update timeout state?
		err = mtproto.ErrPhoneCodeExpired
		return
	}

	// auth.signUp#1b067634 phone_number:string phone_code_hash:string phone_code:string first_name:string last_name:string = auth.Authorization;
	if phoneCode != nil {
		if err = m.VerifyCodeInterface.VerifySmsCode(ctx,
			codeData.PhoneCodeHash,
			*phoneCode,
			codeData.PhoneCodeExtraData); err != nil {
			return
		}
		//if m.VerifyCodeInterface != nil {
		//	err = m.VerifyCodeInterface.VerifySmsCode(ctx, codeData.PhoneCodeHash, *phoneCode, codeData.PhoneCode)
		//	if err != nil {
		//		log.Errorf("verifySmsCode error: %v", err)
		//		err = mtproto.ErrPhoneCodeInvalid
		//		return
		//	}
		//} else if *phoneCode != "12345" {
		//	log.Errorf("verifySmsCode error: %v", err)
		//	err = mtproto.ErrPhoneCodeInvalid
		//	return
		//}
	}

	codeData.State = model.CodeStateOk

	/*
		if !m.AuthCore.UpdatePhoneCodeData(ctx, authKeyId, phoneNumber, phoneCodeHash, codeData) {
			err = mtproto.ErrInternalServerError
			return
		}

		m.PhoneCodeTransaction = codeData
	*/
	return
}