domain
go
import "github.com/prescriptoo/prescriptoo-api/services/medicine/internal/domain"Package domain defines the medicine catalog's storage-independent model.
Index
type Kind
Kind selects one of the catalog resources.
go
type Kind stringgo
const (
Manufacturer Kind = "manufacturers"
Generic Kind = "generics"
Brand Kind = "brands"
Drug Kind = "drugs"
)type Page
Page contains a bounded result and the total before pagination.
go
type Page struct {
Items []Record
TotalItems int
}type Query
Query contains normalized filters and a decoded keyset boundary.
go
type Query struct {
Q, ManufacturerID, GenericID, BrandID, Form, Status, Deletion string
Limit int
Reader bool
AfterCreatedAt *time.Time
AfterID string
}type Record
Record contains the fields of a catalog entry selected by Kind.
go
type Record struct {
Route, TherapeuticClassID, CatalogueVersion string
Aliases, IngredientIDs []string
QuickSigsJSON []byte
ID, Name, Status string
Description *string
CreatedAt, UpdatedAt time.Time
DeletedAt *time.Time
ManufacturerID, GenericID, BrandID, Form, Strength string
Brand, Generic, Manufacturer Summary
}type Summary
Summary supplies related display data for drug records.
go
type Summary struct{ ID, Name string }Generated by gomarkdoc