query

package
v0.0.0-...-ae75a06 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2022 License: Apache-2.0 Imports: 2 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area

type Area struct {
	UID             uuid.UUID   `json:"uid"`
	Name            string      `json:"name"`
	InitialQuantity int         `json:"initial_quantity"`
	CurrentQuantity int         `json:"current_quantity"`
	InitialArea     InitialArea `json:"initial_area"`
	LastWatered     *time.Time  `json:"last_watered"`
	MovingDate      time.Time   `json:"moving_date"`
}

type AreaReadQuery

type AreaReadQuery interface {
	FindByID(areaUID uuid.UUID) <-chan Result
}

type Container

type Container struct {
	Type     string `json:"type"`
	Quantity int    `json:"quantity"`
	Cell     int    `json:"cell"`
}

type CountTotalBatchQueryResult

type CountTotalBatchQueryResult struct {
	VarietyName string `json:"variety_name"`
	TotalBatch  int    `json:"total_batch"`
}

type CropActivityQuery

type CropActivityQuery interface {
	FindAllByCropID(uid uuid.UUID) <-chan Result
	FindByCropIDAndActivityType(uid uuid.UUID, activityType interface{}) <-chan Result
}

type CropAreaByAreaQueryResult

type CropAreaByAreaQueryResult struct {
	UID         uuid.UUID `json:"uid"`
	BatchID     string    `json:"batch_id"`
	Inventory   Inventory `json:"inventory"`
	CreatedDate time.Time `json:"seeding_date"`
	Area        Area      `json:"area"`
	Container   Container `json:"container"`
}

type CropAreaQueryResult

type CropAreaQueryResult struct {
	UID  uuid.UUID `json:"uid"`
	Name string    `json:"name"`
	Size struct {
		Value  float32 `json:"value"`
		Symbol string  `json:"symbol"`
	} `json:"size"`
	Type     string    `json:"type"`
	Location string    `json:"location"`
	FarmUID  uuid.UUID `json:"farm_uid"`
}

type CropEventQuery

type CropEventQuery interface {
	FindAllByCropID(uid uuid.UUID) <-chan Result
}

type CropFarmQueryResult

type CropFarmQueryResult struct {
	UID  uuid.UUID
	Name string
}

type CropInformationQueryResult

type CropInformationQueryResult struct {
	TotalHarvestProduced float32 `json:"total_harvest_produced"`
	TotalPlantVariety    int     `json:"total_plant_variety"`
}

type CropMaterialQueryResult

type CropMaterialQueryResult struct {
	UID           uuid.UUID `json:"uid"`
	TypeCode      string    `json:"type"`
	PlantTypeCode string    `json:"plant_type"`
	Name          string    `json:"name"`
}

type CropQuery

type CropQuery interface {
	FindByBatchID(batchID string) <-chan Result
	FindAllCropsByFarm(farmUID uuid.UUID) <-chan Result
	FindAllCropsByArea(areaUID uuid.UUID) <-chan Result
}

type CropReadQuery

type CropReadQuery interface {
	FindByID(uid uuid.UUID) <-chan Result
	FindByBatchID(batchID string) <-chan Result
	FindAllCropsByFarm(farmUID uuid.UUID, status string, page, limit int) <-chan Result
	CountAllCropsByFarm(farmUID uuid.UUID, status string) <-chan Result
	FindAllCropsByArea(areaUID uuid.UUID) <-chan Result
	FindAllCropsArchives(farmUID uuid.UUID, page, limit int) <-chan Result
	CountAllArchivedCropsByFarm(farmUID uuid.UUID) <-chan Result
	FindCropsInformation(farmUID uuid.UUID) <-chan Result
	CountTotalBatch(farmUID uuid.UUID) <-chan Result
}

type CropTaskQueryResult

type CropTaskQueryResult struct {
	UID         uuid.UUID
	Title       string
	Description string
	Category    string
	Status      string
	Domain      string
	AssetUID    uuid.UUID
	MaterialUID uuid.UUID
	AreaUID     uuid.UUID
}

type FarmReadQuery

type FarmReadQuery interface {
	FindByID(farmUID uuid.UUID) <-chan Result
}

type InitialArea

type InitialArea struct {
	UID         uuid.UUID `json:"uid"`
	Name        string    `json:"name"`
	CreatedDate time.Time `json:"created_date"`
}

type Inventory

type Inventory struct {
	UID       uuid.UUID `json:"uid"`
	PlantType string    `json:"plant_type"`
	Name      string    `json:"name"`
}

type MaterialReadQuery

type MaterialReadQuery interface {
	FindByID(inventoryUID uuid.UUID) <-chan Result
	FindMaterialByPlantTypeCodeAndName(plantType string, name string) <-chan Result
}

type Result

type Result struct {
	Result interface{}
	Error  error
}

type TaskReadQuery

type TaskReadQuery interface {
	FindByID(taskUID uuid.UUID) <-chan Result
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL