1.3 KiB
1.3 KiB
Data Models - Main
This document outlines the database models (tables) used in the Pig Farm Controller application, primarily managed by GORM.
Overview
The GetAllModels() function in internal/infra/models/models.go provides a comprehensive list of all GORM models, which correspond to the database tables. This ensures that all necessary tables are migrated during database initialization.
Database Tables
Below is a list of all identified database tables:
Core Models
UserUserActionLog
Device Models
DeviceAreaControllerDeviceTemplateSensorDataDeviceCommandLog
Plan & Task Models
PlanSubPlanTaskPlanExecutionLogTaskExecutionLogPendingTaskPendingCollection
Farm Asset Models
PigHousePen
Pig & Batch Models
PigBatchPigBatchLogWeighingBatchWeighingRecordPigTransferLogPigSickLog
Pig Buy & Sell Models
PigPurchasePigSale
Feed Models
RawMaterialRawMaterialPurchaseRawMaterialStockLogFeedFormulaFeedFormulaComponentFeedUsageRecord
Medication Models
MedicationMedicationLog
Notification Models
Notification