Skip to main content

Entity Detail

This page provides detailed information about key ORM entities, including their columns, types, and constraints.

MngCountry​

Represents countries configured in the system.

ColumnTypeConstraintsDescription
idIntegerPK, Auto-incrementUnique identifier
nameString(255)NOT NULLCountry name
iso2String(2)NOT NULLISO 3166-1 alpha-2 code
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

Relationships: MngAdmin1, Forecast, MngCultivar, MngSoil, MngDataSource, UserAccess, MngCountryIndicator, MngCountryClimateMeasure

MngAdmin1​

First-level administrative divisions (departments, states, provinces).

ColumnTypeConstraintsDescription
idIntegerPK, Auto-incrementUnique identifier
country_idIntegerFK → mng_country.id, NOT NULLParent country
nameString(255)NOT NULLDivision name
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

Relationships: MngCountry (parent), MngAdmin2, MngLocation

MngAdmin2​

Second-level administrative divisions (municipalities, districts).

ColumnTypeConstraintsDescription
idIntegerPK, Auto-incrementUnique identifier
admin_1_idIntegerFK → mng_admin_1.id, NOT NULLParent division
nameString(255)NOT NULLDivision name
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

Relationships: MngAdmin1 (parent), MngLocation

Forecast​

Represents a forecast run for a country.

ColumnTypeConstraintsDescription
idBigIntegerPK, Auto-incrementUnique identifier
country_idIntegerFK → mng_country.id, NOT NULLCountry for forecast
run_dateDateNOT NULLForecast run date
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

Relationships: MngCountry (parent), ForecastAnalogue (children)

ForecastAnalogue​

Analogue data associated with a forecast.

ColumnTypeConstraintsDescription
idBigIntegerPK, Auto-incrementUnique identifier
forecast_idBigIntegerFK → forecast.id, NOT NULLParent forecast
analogue_yearIntegerNOT NULLYear used as analogue
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

Relationships: Forecast (parent)

ClimateHistoricalDaily​

Daily climate observations data.

ColumnTypeConstraintsDescription
idBigIntegerPK, Auto-incrementUnique identifier
location_idIntegerFK → mng_location.id, NOT NULLWeather station/location
dateDateNOT NULLObservation date
variableString(50)NOT NULLClimate variable code
valueFloatNOT NULLMeasured value
source_idIntegerFK → mng_source.idData source
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

MngCrop​

Crop type definitions.

ColumnTypeConstraintsDescription
idIntegerPK, Auto-incrementUnique identifier
nameString(255)NOT NULLCrop name
codeString(50)Crop code identifier
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

MngCultivar​

Cultivar variety definitions per country.

ColumnTypeConstraintsDescription
idIntegerPK, Auto-incrementUnique identifier
country_idIntegerFK → mng_country.id, NOT NULLCountry
crop_idIntegerFK → mng_crop.id, NOT NULLParent crop
nameString(255)NOT NULLCultivar name
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

MngSoil​

Soil type definitions per country.

ColumnTypeConstraintsDescription
idIntegerPK, Auto-incrementUnique identifier
country_idIntegerFK → mng_country.id, NOT NULLCountry
nameString(255)NOT NULLSoil type name
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

User and Security​

User​

ColumnTypeConstraintsDescription
idIntegerPK, Auto-incrementUnique identifier
usernameString(100)NOT NULL, UNIQUELogin username
emailString(255)NOT NULL, UNIQUEEmail address
password_hashString(255)NOT NULLHashed password
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp

Role​

ColumnTypeConstraintsDescription
idIntegerPK, Auto-incrementUnique identifier
nameString(100)NOT NULL, UNIQUERole name
descriptionTextRole description
enableBooleanDefault: trueSoft delete flag
registerDateTime(tz)NOT NULLCreation timestamp
updatedDateTime(tz)NOT NULLLast update timestamp