...
|
...
|
@@ -28,12 +28,14 @@ func (repo *UserRepository) Insert(user *domain.User) (*domain.User, error) { |
|
|
AvatarUrl: user.AvatarUrl,
|
|
|
CompanyId: user.CompanyId,
|
|
|
AdminType: user.AdminType,
|
|
|
DepartmentId: user.DepartmentId,
|
|
|
PositionId: user.PositionId,
|
|
|
Name: user.Name,
|
|
|
Email: user.Email,
|
|
|
Status: user.Status,
|
|
|
UpdatedAt: user.UpdatedAt,
|
|
|
DepartmentId: user.DepartmentId,
|
|
|
PositionId: user.PositionId,
|
|
|
EntryTime: user.EntryTime,
|
|
|
CreatedAt: user.CreatedAt,
|
|
|
UpdatedAt: user.UpdatedAt,
|
|
|
DeletedAt: user.DeletedAt,
|
|
|
}
|
|
|
tx := repo.transactionContext.PgTx
|
...
|
...
|
@@ -52,13 +54,14 @@ func (repo *UserRepository) Update(user *domain.User) (*domain.User, error) { |
|
|
AvatarUrl: user.AvatarUrl,
|
|
|
CompanyId: user.CompanyId,
|
|
|
AdminType: user.AdminType,
|
|
|
DepartmentId: user.DepartmentId,
|
|
|
PositionId: user.PositionId,
|
|
|
Name: user.Name,
|
|
|
Email: user.Email,
|
|
|
Status: user.Status,
|
|
|
UpdatedAt: user.UpdatedAt,
|
|
|
DepartmentId: user.DepartmentId,
|
|
|
PositionId: user.PositionId,
|
|
|
EntryTime: user.EntryTime,
|
|
|
CreatedAt: user.CreatedAt,
|
|
|
UpdatedAt: user.UpdatedAt,
|
|
|
DeletedAt: user.DeletedAt,
|
|
|
}
|
|
|
tx := repo.transactionContext.PgTx
|
...
|
...
|
@@ -147,8 +150,11 @@ func (repo *UserRepository) TransformToUserDomain(user *models.User) *domain.Use |
|
|
Name: user.Name,
|
|
|
Email: user.Email,
|
|
|
Status: user.Status,
|
|
|
DepartmentId: user.DepartmentId,
|
|
|
PositionId: user.PositionId,
|
|
|
EntryTime: user.EntryTime,
|
|
|
UpdatedAt: user.UpdatedAt,
|
|
|
CreatedAt: user.CreatedAt,
|
|
|
DeletedAt: user.DeletedAt,
|
|
|
CreatedAt: user.CreatedAt,
|
|
|
}
|
|
|
} |
...
|
...
|
|