23 lines
542 B
Go
23 lines
542 B
Go
package result
|
|
|
|
import (
|
|
"gotemplate/internal/database"
|
|
"gotemplate/internal/database/repository"
|
|
)
|
|
|
|
func ParseValue(result *repository.ListResultValuesByIDRow) *Value {
|
|
return &Value{
|
|
ID: database.MustToUUID(result.ID),
|
|
QueryID: database.MustToUUID(result.Queryid),
|
|
Value: result.Value,
|
|
}
|
|
}
|
|
|
|
func Parse(dbQuery *repository.ListResultsByDocumentIDRow) *Result {
|
|
return &Result{
|
|
ID: database.MustToUUID(dbQuery.ID),
|
|
QueryID: database.MustToUUID(dbQuery.Queryid),
|
|
QueryVersion: dbQuery.Queryversion,
|
|
}
|
|
}
|