Refactor customer domain by removing obsolete files and updating main application structure

- Deleted customer domain files including entities, services, handlers, and forms to streamline the codebase.
- Removed customer-related routes and service initializations from the main application.
- Updated Swagger documentation to reflect the removal of customer endpoints and definitions.
- Cleaned up the project structure to enhance maintainability and focus on user management functionality.
This commit is contained in:
n.nakhostin
2025-08-10 19:05:46 +03:30
parent c89041812a
commit dbcc2d1d4a
13 changed files with 60 additions and 5283 deletions
-59
View File
@@ -1,59 +0,0 @@
package customer
import (
"github.com/google/uuid"
)
// Gender represents user gender
type Gender string
const (
GenderMale Gender = "male"
GenderFemale Gender = "female"
GenderOther Gender = "other"
)
// CustomerStatus represents customer account status
type CustomerStatus string
const (
CustomerStatusActive CustomerStatus = "active"
CustomerStatusInactive CustomerStatus = "inactive"
)
// DeviceType represents the type of device
type DeviceType string
const (
DeviceTypeAndroid DeviceType = "android"
DeviceTypeIOS DeviceType = "ios"
)
// DeviceToken represents a device token for push notifications
type DeviceToken struct {
Token string `bson:"token"`
DeviceType DeviceType `bson:"device_type"`
CreatedAt int64 `bson:"created_at"` // Unix timestamp
UpdatedAt int64 `bson:"updated_at"` // Unix timestamp
}
// Customer represents a mobile app user (customer)
type Customer struct {
ID uuid.UUID `bson:"_id"`
FullName string `bson:"full_name"`
Username string `bson:"username"`
Email string `bson:"email"`
Mobile string `bson:"mobile"`
Password string `bson:"password"` // Never serialize password
NationalID *string `bson:"national_id,omitempty"`
Gender *Gender `bson:"gender,omitempty"`
Birthdate *int64 `bson:"birthdate,omitempty"` // Unix timestamp
ProfileImage *string `bson:"profile_image,omitempty"`
Status CustomerStatus `bson:"status"`
CompanyID *uuid.UUID `bson:"company_id,omitempty"`
IsVerified bool `bson:"is_verified"`
DeviceTokens []DeviceToken `bson:"device_tokens"` // For push notifications
LastLoginAt *int64 `bson:"last_login_at,omitempty"` // Unix timestamp
CreatedAt int64 `bson:"created_at"` // Unix timestamp
UpdatedAt int64 `bson:"updated_at"` // Unix timestamp
}