package ports import ( "context" "time" "Yimaru-Backend/internal/domain" ) type UserStore interface { CreateGoogleUser(ctx context.Context, gUser domain.GoogleUser) (domain.User, error) LinkGoogleAccount(ctx context.Context, userID int64, googleID string) error IsProfileCompleted(ctx context.Context, userId int64) (bool, error) UpdateUserStatus(ctx context.Context, req domain.UpdateUserStatusReq) error // GetCorrectOptionForQuestion( // ctx context.Context, // questionID int64, // ) (int64, error) // GetLatestAssessmentAttempt( // ctx context.Context, // userID int64, // ) (*dbgen.AssessmentAttempt, error) UpdateUserKnowledgeLevel(ctx context.Context, userID int64, knowledgeLevel string) error // IsUserNameUnique(ctx context.Context, userName string) (bool, error) IsUserPending(ctx context.Context, userID int64) (bool, error) // GetUserByUserName( // ctx context.Context, // userName string, // ) (domain.User, error) CreateUser( ctx context.Context, user domain.User, usedOtpId int64, ) (domain.User, error) CreateUserWithoutOtp( ctx context.Context, user domain.User, ) (domain.User, error) GetUserByGoogleID( ctx context.Context, googleId string, ) (domain.User, error) GetUserByID( ctx context.Context, id int64, ) (domain.User, error) GetAllUsers( ctx context.Context, role *string, query *string, createdBefore, createdAfter *time.Time, limit, offset int32, ) ([]domain.User, int64, error) GetTotalUsers(ctx context.Context, role *string) (int64, error) SearchUserByNameOrPhone( ctx context.Context, search string, role *string, ) ([]domain.User, error) UpdateUser(ctx context.Context, req domain.UpdateUserReq) error DeleteUser(ctx context.Context, userID int64) error CheckPhoneEmailExist(ctx context.Context, phone, email string) (phoneExists, emailExists bool, err error) GetUserByEmailPhone( ctx context.Context, email string, phone string, ) (domain.User, error) UpdatePassword(ctx context.Context, password string, userID int64) error } type SmsGateway interface { SendSMSOTP(ctx context.Context, phoneNumber, otp string) error } type EmailGateway interface { SendEmailOTP(ctx context.Context, email string, otp string) error } type OtpStore interface { UpdateOtp(ctx context.Context, otp string, userID int64) error MarkOtpAsUsed(ctx context.Context, otp domain.Otp) error CreateOtp(ctx context.Context, otp domain.Otp) error GetOtp(ctx context.Context, userID int64) (domain.Otp, error) }