diff --git a/pkg/model/mapfix.go b/pkg/model/mapfix.go index a296359..950c6ec 100644 --- a/pkg/model/mapfix.go +++ b/pkg/model/mapfix.go @@ -39,4 +39,5 @@ type Mapfix struct { Completed bool // Has this version of the map been completed at least once on maptest TargetAssetID uint64 // where to upload map fix. if the TargetAssetID is 0, it's a new map. StatusID MapfixStatus + Description string // mapfix description } diff --git a/pkg/model/nats.go b/pkg/model/nats.go index 0808a89..91c0453 100644 --- a/pkg/model/nats.go +++ b/pkg/model/nats.go @@ -15,6 +15,7 @@ type CreateMapfixRequest struct { OperationID int32 ModelID uint64 TargetAssetID uint64 + Description string } diff --git a/pkg/service/mapfixes.go b/pkg/service/mapfixes.go index 0d37705..8c42171 100644 --- a/pkg/service/mapfixes.go +++ b/pkg/service/mapfixes.go @@ -114,6 +114,7 @@ func (svc *Service) CreateMapfix(ctx context.Context, request *api.MapfixTrigger OperationID: operation.ID, ModelID: ModelID, TargetAssetID: TargetAssetID, + Description: request.Description, } j, err := json.Marshal(create_request) @@ -154,6 +155,7 @@ func (svc *Service) GetMapfix(ctx context.Context, params api.GetMapfixParams) ( Completed: mapfix.Completed, TargetAssetID: int64(mapfix.TargetAssetID), StatusID: int32(mapfix.StatusID), + Description: mapfix.Description, }, nil } @@ -213,6 +215,7 @@ func (svc *Service) ListMapfixes(ctx context.Context, params api.ListMapfixesPar Completed: item.Completed, TargetAssetID: int64(item.TargetAssetID), StatusID: int32(item.StatusID), + Description: item.Description, }) } diff --git a/pkg/service_internal/mapfixes.go b/pkg/service_internal/mapfixes.go index c52c533..0785aeb 100644 --- a/pkg/service_internal/mapfixes.go +++ b/pkg/service_internal/mapfixes.go @@ -347,6 +347,7 @@ func (svc *Service) CreateMapfix(ctx context.Context, request *internal.MapfixCr Completed: false, TargetAssetID: TargetAssetID, StatusID: model.MapfixStatusUnderConstruction, + Description: request.Description, }) if err != nil { return nil, err