24 lines
572 B
Go
24 lines
572 B
Go
|
package app
|
||
|
|
||
|
import (
|
||
|
"git.3crabs.ru/save_my_money/smm_core/internal/services/budget"
|
||
|
"git.3crabs.ru/save_my_money/smm_core/internal/services/user"
|
||
|
proto "git.3crabs.ru/save_my_money/smm_core/proto"
|
||
|
)
|
||
|
|
||
|
func mapUser(user *user.UserEntity) *proto.User {
|
||
|
return &proto.User{
|
||
|
Id: int32(user.Id),
|
||
|
Username: user.Username,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func mapBudget(budget *budget.BudgetEntity) *proto.Budget {
|
||
|
return &proto.Budget{
|
||
|
Id: int32(budget.Id),
|
||
|
Name: budget.Name,
|
||
|
StartDay: int32(budget.StartDay),
|
||
|
MonthlyLimit: int32(budget.MonthlyLimit),
|
||
|
}
|
||
|
}
|