From dd41ab825aeea35e718edd1a462f62568db4a7c7 Mon Sep 17 00:00:00 2001 From: Gear <84141000+macgeargear@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:36:49 +0700 Subject: [PATCH] fix: remove user model --- internal/user/user.repository.go | 22 ---------------------- internal/user/user.service.go | 1 - 2 files changed, 23 deletions(-) delete mode 100644 internal/user/user.repository.go delete mode 100644 internal/user/user.service.go diff --git a/internal/user/user.repository.go b/internal/user/user.repository.go deleted file mode 100644 index 7e72506..0000000 --- a/internal/user/user.repository.go +++ /dev/null @@ -1,22 +0,0 @@ -package user - -import ( - "github.com/isd-sgcu/rpkm67-model/model" - "gorm.io/gorm" -) - -type Repository interface { - FindByEmail(email string, user *model.User) error -} - -type repositoryImpl struct { - Db *gorm.DB -} - -func NewRepository(db *gorm.DB) Repository { - return &repositoryImpl{Db: db} -} - -func (r *repositoryImpl) FindByEmail(email string, user *model.User) error { - return r.Db.First(user, "email = ?", email).Error -} diff --git a/internal/user/user.service.go b/internal/user/user.service.go deleted file mode 100644 index a00006b..0000000 --- a/internal/user/user.service.go +++ /dev/null @@ -1 +0,0 @@ -package user