23 lines
416 B
Go
23 lines
416 B
Go
package result
|
|
|
|
import (
|
|
"gotemplate/internal/database"
|
|
"gotemplate/internal/database/repository"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Value struct {
|
|
ID uuid.UUID
|
|
QueryID uuid.UUID
|
|
Value string
|
|
}
|
|
|
|
func ParseResultValue(result repository.ListResultValuesByIDRow) Value {
|
|
return Value{
|
|
ID: database.MustToUUID(result.ID),
|
|
QueryID: database.MustToUUID(result.Queryid),
|
|
Value: result.Value,
|
|
}
|
|
}
|