Documentation ¶
Index ¶
- Constants
- type ActivityType
- type AreaStatus
- type Container
- type CropActivity
- type CropActivityStorage
- type CropEvent
- type CropEventStorage
- type CropPhoto
- type CropRead
- type CropReadStorage
- type DumpActivity
- type HarvestActivity
- type HarvestedStorage
- type InitialArea
- type Inventory
- type MoveActivity
- type MovedArea
- type PhotoActivity
- type SeedActivity
- type TaskCropActivity
- type TaskNutrientActivity
- type TaskPestControlActivity
- type TaskSafetyActivity
- type TaskSanitationActivity
- type Trash
- type WaterActivity
Constants ¶
View Source
const ( SeedActivityCode = "SEED" MoveActivityCode = "MOVE" HarvestActivityCode = "HARVEST" DumpActivityCode = "DUMP" PhotoActivityCode = "PHOTO" WaterActivityCode = "WATER" TaskCropActivityCode = "TASK_CROP" TaskNutrientActivityCode = "TASK_NUTRIENT" TaskPestControlActivityCode = "TASK_PEST_CONTROL" TaskSafetyActivityCode = "TASK_SAFETY" TaskSanitationActivityCode = "TASK_SANITATION" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityType ¶
type ActivityType interface {
Code() string
}
type AreaStatus ¶
type CropActivity ¶
type CropActivityStorage ¶
type CropActivityStorage struct { Lock *deadlock.RWMutex CropActivityMap []CropActivity }
func CreateCropActivityStorage ¶
func CreateCropActivityStorage() *CropActivityStorage
type CropEventStorage ¶
func CreateCropEventStorage ¶
func CreateCropEventStorage() *CropEventStorage
type CropRead ¶
type CropRead struct { UID uuid.UUID `json:"uid"` BatchID string `json:"batch_id"` Status string `json:"status"` Type string `json:"type"` Container Container `json:"container"` Inventory Inventory `json:"inventory"` AreaStatus AreaStatus `json:"area_status"` Photos []CropPhoto `json:"photos"` FarmUID uuid.UUID `json:"farm_id"` // Fields to track crop's movement InitialArea InitialArea `json:"initial_area"` MovedArea []MovedArea `json:"moved_area"` HarvestedStorage []HarvestedStorage `json:"harvested_storage"` Trash []Trash `json:"trash"` // Notes Notes []domain.CropNote `json:"notes"` }
type CropReadStorage ¶
func CreateCropReadStorage ¶
func CreateCropReadStorage() *CropReadStorage
type DumpActivity ¶
type DumpActivity struct { SrcAreaUID uuid.UUID `json:"source_area_id"` SrcAreaName string `json:"source_area_name"` Quantity int `json:"quantity"` DumpDate time.Time `json:"dump_date"` }
func (DumpActivity) Code ¶
func (a DumpActivity) Code() string
type HarvestActivity ¶
type HarvestActivity struct { Type string `json:"type"` SrcAreaUID uuid.UUID `json:"source_area_id"` SrcAreaName string `json:"source_area_name"` Quantity int `json:"quantity"` ProducedGramQuantity float32 `json:"produced_gram_quantity"` HarvestDate time.Time `json:"harvest_date"` }
func (HarvestActivity) Code ¶
func (a HarvestActivity) Code() string
type HarvestedStorage ¶
type HarvestedStorage struct { Quantity int `json:"quantity"` ProducedGramQuantity float32 `json:"produced_gram_quantity"` SourceAreaUID uuid.UUID `json:"source_area_id"` SourceAreaName string `json:"source_area_name"` CreatedDate time.Time `json:"created_date"` LastUpdated time.Time `json:"last_updated"` }
type InitialArea ¶
type InitialArea struct { AreaUID uuid.UUID `json:"area_id"` Name string `json:"name"` InitialQuantity int `json:"initial_quantity"` CurrentQuantity int `json:"current_quantity"` LastWatered *time.Time `json:"last_watered"` LastFertilized *time.Time `json:"last_fertilized"` LastPruned *time.Time `json:"last_pruned"` LastPesticided *time.Time `json:"last_pesticided"` CreatedDate time.Time `json:"created_date"` LastUpdated time.Time `json:"last_updated"` }
type MoveActivity ¶
type MoveActivity struct { SrcAreaUID uuid.UUID `json:"source_area_id"` SrcAreaName string `json:"source_area_name"` DstAreaUID uuid.UUID `json:"destination_area_id"` DstAreaName string `json:"destination_area_name"` Quantity int `json:"quantity"` MovedDate time.Time `json:"moved_date"` }
func (MoveActivity) Code ¶
func (a MoveActivity) Code() string
type MovedArea ¶
type MovedArea struct { AreaUID uuid.UUID `json:"area_id"` Name string `json:"name"` InitialQuantity int `json:"initial_quantity"` CurrentQuantity int `json:"current_quantity"` LastWatered *time.Time `json:"last_watered"` LastFertilized *time.Time `json:"last_fertilized"` LastPruned *time.Time `json:"last_pruned"` LastPesticided *time.Time `json:"last_pesticided"` CreatedDate time.Time `json:"created_date"` LastUpdated time.Time `json:"last_updated"` }
type PhotoActivity ¶
type PhotoActivity struct { UID uuid.UUID `json:"uid"` Filename string `json:"filename"` MimeType string `json:"mime_type"` Size int `json:"size"` Width int `json:"width"` Height int `json:"height"` Description string `json:"description"` }
func (PhotoActivity) Code ¶
func (a PhotoActivity) Code() string
type SeedActivity ¶
type SeedActivity struct { AreaUID uuid.UUID `json:"area_id"` AreaName string `json:"area_name"` Quantity int `json:"quantity"` SeedingDate time.Time `json:"seeding_date"` }
func (SeedActivity) Code ¶
func (a SeedActivity) Code() string
type TaskCropActivity ¶
type TaskCropActivity struct { TaskUID uuid.UUID `json:"task_id"` Title string `json:"title"` Description string `json:"description"` AreaName string `json:"area_name"` }
func (TaskCropActivity) Code ¶
func (a TaskCropActivity) Code() string
type TaskNutrientActivity ¶
type TaskNutrientActivity struct { TaskUID uuid.UUID `json:"task_id"` MaterialType string `json:"material_type"` MaterialName string `json:"material_name"` AreaName string `json:"area_name"` }
func (TaskNutrientActivity) Code ¶
func (a TaskNutrientActivity) Code() string
type TaskPestControlActivity ¶
type TaskPestControlActivity struct { TaskUID uuid.UUID `json:"task_id"` MaterialType string `json:"material_type"` MaterialName string `json:"material_name"` AreaName string `json:"area_name"` }
func (TaskPestControlActivity) Code ¶
func (a TaskPestControlActivity) Code() string
type TaskSafetyActivity ¶
type TaskSafetyActivity struct { TaskUID uuid.UUID `json:"task_id"` Title string `json:"title"` Description string `json:"description"` AreaName string `json:"area_name"` }
func (TaskSafetyActivity) Code ¶
func (a TaskSafetyActivity) Code() string
type TaskSanitationActivity ¶
type TaskSanitationActivity struct { TaskUID uuid.UUID `json:"task_id"` Title string `json:"title"` Description string `json:"description"` AreaName string `json:"area_name"` }
func (TaskSanitationActivity) Code ¶
func (a TaskSanitationActivity) Code() string
Click to show internal directories.
Click to hide internal directories.