lifedebugger commited on
Commit
8e48e05
·
verified ·
1 Parent(s): 0ce5752

Delete models

Browse files
models/ExceptionModel.go DELETED
@@ -1,12 +0,0 @@
1
- package models
2
-
3
- type Exception struct {
4
- Unauthorized bool `json:"unauthorized,omitempty"`
5
- BadRequest bool `json:"bad_request,omitempty"`
6
- DataNotFound bool `json:"data_not_found,omitempty"`
7
- InternalServerError bool `json:"internal_server_error,omitempty"`
8
- DataDuplicate bool `json:"data_duplicate,omitempty"`
9
- QueryError bool `json:"query_error,omitempty"`
10
- InvalidPasswordLength bool `json:"invalid_password_length,omitempty"`
11
- Message string `json:"message,omitempty"`
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
models/RequestModel.go DELETED
@@ -1,13 +0,0 @@
1
- package models
2
-
3
- type LoginRequest struct {
4
- Email string `json:"email" binding:"required"`
5
- Password string `json:"password" binding:"required"`
6
- }
7
-
8
- type RegisterRequest struct {
9
- Name string `json:"name"`
10
- Email string `json:"email" binding:"required,email"`
11
- Phone int `json:"phone"`
12
- Password string `json:"password" binding:"required"`
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/ResponseModel.go DELETED
@@ -1,6 +0,0 @@
1
- package models
2
-
3
- type AuthenticatedUser struct {
4
- Account Account `json:"account"`
5
- Token string `json:"token"`
6
- }
 
 
 
 
 
 
 
models/authentication_payload_model.go DELETED
@@ -1,7 +0,0 @@
1
- package models
2
-
3
- type AccountData struct {
4
- UserID int
5
- VerifyStatus string
6
- ErrVerif error
7
- }
 
 
 
 
 
 
 
 
models/database_orm_model.go DELETED
@@ -1,31 +0,0 @@
1
- package models
2
-
3
- import (
4
- "time"
5
-
6
- uuid "github.com/satori/go.uuid"
7
- )
8
-
9
- type Account struct {
10
- Id uint `gorm:"primaryKey" json:"id"`
11
- UUID uuid.UUID `gorm:"type:uuid" json:"uuid" `
12
- Email string `gorm:"uniqueIndex" json:"email"`
13
- Password string `json:"password"`
14
- IsEmailVerified bool `json:"is_email_verified"`
15
- CreatedAt time.Time `json:"created_at"`
16
- DeletedAt time.Time `json:"deleted_at"`
17
- }
18
-
19
- type AccountDetails struct {
20
- IDDetail uint `gorm:"primaryKey" json:"id_detail"`
21
- Account_id uint `json:"id_account"`
22
- Province string `json:"province"`
23
- City string `json:"city"`
24
- Institution string `json:"institution"`
25
- UpdatedAt time.Time `json:"updated_at"`
26
- DeletedAt time.Time `json:"deleted_at"`
27
- }
28
-
29
- // Gorm table name settings
30
- func (Account) TableName() string { return "account" }
31
- func (AccountDetails) TableName() string { return "account_details" }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/exception_model.go DELETED
@@ -1,12 +0,0 @@
1
- package models
2
-
3
- type Exception struct {
4
- Unauthorized bool `json:"unauthorized,omitempty"`
5
- BadRequest bool `json:"bad_request,omitempty"`
6
- DataNotFound bool `json:"data_not_found,omitempty"`
7
- InternalServerError bool `json:"internal_server_error,omitempty"`
8
- DataDuplicate bool `json:"data_duplicate,omitempty"`
9
- QueryError bool `json:"query_error,omitempty"`
10
- InvalidPasswordLength bool `json:"invalid_password_length,omitempty"`
11
- Message string `json:"message,omitempty"`
12
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
models/model.go DELETED
@@ -1 +0,0 @@
1
- package models
 
 
models/request_model.go DELETED
@@ -1,13 +0,0 @@
1
- package models
2
-
3
- type LoginRequest struct {
4
- Email string `json:"email" binding:"required"`
5
- Password string `json:"password" binding:"required"`
6
- }
7
-
8
- type RegisterRequest struct {
9
- Name string `json:"name"`
10
- Email string `json:"email" binding:"required,email"`
11
- Phone int `json:"phone"`
12
- Password string `json:"password" binding:"required"`
13
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models/response_model.go DELETED
@@ -1,19 +0,0 @@
1
- package models
2
-
3
- type SuccessResponse struct {
4
- Status string `json:"status"`
5
- Message string `json:"message"`
6
- Data any `json:"data"`
7
- MetaData any `json:"meta_data"`
8
- }
9
-
10
- type ErrorResponse struct {
11
- Status string `json:"status"`
12
- Message string `json:"message"`
13
- Errors Exception `json:"errors"`
14
- MetaData any `json:"meta_data"`
15
- }
16
- type AuthenticatedUser struct {
17
- Account Account `json:"account"`
18
- Token string `json:"token"`
19
- }