Add configuration file and update server settings
- Introduced a new `config.yaml` file for managing server, database, cache, queue, AI, scraping, logging, and rate limiting configurations. - Updated `docker-compose.yml` to reflect the new server port (8081) and adjusted health check endpoints accordingly. - Modified `Dockerfile` to expose the new server port. - Updated `README.md` to reflect changes in server configuration and added documentation for the new configuration structure. - Added test scripts for server and Swagger documentation testing. - Refactored customer domain structure to align with new configuration settings and improve maintainability.
This commit is contained in:
@@ -6,11 +6,11 @@ import (
|
||||
|
||||
type CustomerAggregate struct {
|
||||
ID uuid.UUID `json:"_id"`
|
||||
FirstName string `json:"first_name"`
|
||||
LastName string `json:"last_name"`
|
||||
FullName string `json:"full_name"`
|
||||
Username string `json:"username"`
|
||||
Mobile string `json:"mobile"`
|
||||
Email string `json:"email"`
|
||||
IsActive bool `json:"is_active"`
|
||||
Status string `json:"status"`
|
||||
IsVerified bool `json:"is_verified"`
|
||||
LastLoginAt *int64 `json:"last_login_at,omitempty"` // Unix timestamp
|
||||
CreatedAt int64 `json:"created_at"` // Unix timestamp
|
||||
@@ -20,16 +20,15 @@ type CustomerAggregate struct {
|
||||
func NewCustomerAggregate(c Customer) CustomerAggregate {
|
||||
customer := CustomerAggregate{
|
||||
ID: c.ID,
|
||||
FirstName: c.FirstName,
|
||||
LastName: c.LastName,
|
||||
Mobile: c.Mobile,
|
||||
FullName: c.FullName,
|
||||
Username: c.Username,
|
||||
Email: c.Email,
|
||||
IsActive: c.IsActive,
|
||||
Mobile: c.Mobile,
|
||||
Status: string(c.Status),
|
||||
IsVerified: c.IsVerified,
|
||||
CreatedAt: c.CreatedAt,
|
||||
UpdatedAt: c.UpdatedAt,
|
||||
}
|
||||
|
||||
if c.LastLoginAt != nil {
|
||||
customer.LastLoginAt = c.LastLoginAt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user