farmus

Tables (18)

ACTUATOR (actuator)

  • Actuator_id (actuator_id) — BIGINT — Primary key — NOT NULL
  • Actuator_type (actuator_type) — VARCHAR(255)
  • Name (name) — VARCHAR(255)
  • Pin_mapping (pin_mapping) — VARCHAR(255)
  • Status (status) — VARCHAR(255)
  • Device_id (device_id) — BIGINT — Foreign key → DEVICE.Device_id — NOT NULL

ALERT (alert)

  • Alert_id (alert_id) — BIGINT — Primary key — NOT NULL
  • Alert_type (alert_type) — VARCHAR(255)
  • Titlet (title) — VARCHAR(255)
  • Body (body) — TEXT
  • Severity (severity) — VARCHAR(255)
  • Created_at (created_at) — DATETIME
  • Read_at (read_at) — DATETIME
  • Farm_id (farm_id) — BIGINT — Foreign key → FARM.Farm_id — NOT NULL

CAMERA (camera)

  • Camera_id (camera_id) — BIGINT — Primary key — NOT NULL
  • Stream_url (stream_url) — VARCHAR(255)
  • Name (name) — VARCHAR(255)
  • Device_id (device_id) — BIGINT — Foreign key → DEVICE.Device_id — NOT NULL

CHAT_MESSAGE (chat_message)

  • Message_id (message_id) — BIGINT — Primary key — NOT NULL
  • Sender (sender) — VARCHAR(255)
  • Content (content) — TEXT
  • Sent_at (sent_at) — DATETIME
  • Session_id (session_id) — BIGINT — Foreign key → CHAT_SESSION.Session_id — NOT NULL

CHAT_SESSION (chat_session)

  • Session_id (session_id) — BIGINT — Primary key — NOT NULL
  • Startd_at (startd_at) — DATETIME
  • User_id (user_id) — BIGINT — Foreign key → USER.User_id — NOT NULL
  • Farm_id (farm_id) — BIGINT — Foreign key → FARM.Farm_id — NOT NULL

CONTROL_COMMAND (control_command)

  • Command_id (command_id) — BIGINT — Primary key — NOT NULL
  • Intent (intent) — VARCHAR(255)
  • Scheduled_for (scheduled_for) — DATETIME
  • Params_json (params_json) — TEXT
  • Parse_status (parse_status) — VARCHAR(255)
  • Message_id (message_id) — BIGINT — Foreign key → CHAT_MESSAGE.Message_id — NOT NULL
  • Farm_id (farm_id) — BIGINT — Foreign key → FARM.Farm_id — NOT NULL

DEVICE (device)

  • Device_id (device_id) — BIGINT — Primary key — NOT NULL
  • Device_uuid (device_uuid) — VARCHARR(36)
  • Name (namen) — VARCHAR(255)
  • Status (status) — VARCHAR(255)
  • Last_seen_at (last_seen_at) — DATETIME
  • Farm_id (farm_id) — BIGINT — Foreign key → FARM.Farm_id — NOT NULL

DEVICE_COMMAND_LOG (device_command_log)

  • Cmdlog_id (cmdlog_id) — BIGINT — Primary key — NOT NULL
  • Action (actiona) — VARCHAR(255)
  • Payload_json (payload_json) — TEXT
  • Status (status) — VARCHAR(255)
  • Executed_at (executed_at) — DATETIME
  • Device_id (device_id) — BIGINT — Foreign key → DEVICE.Device_id — NOT NULL
  • Actuator_id (actuator_id) — BIGINT — Foreign key → ACTUATOR.Actuator_id — NOT NULL
  • Command_id (command_id) — BIGINT — Foreign key → CONTROL_COMMAND.Command_id — NOT NULL

FARM (farm)

  • Farm_id (farm_id) — BIGINT — Primary key — NOT NULL
  • Name (name) — VARCHAR(255)
  • Location_text (location_text) — VARCHAR(255)
  • Created_at — DATETIME

FARM_MEMBER (farm_member)

  • Farm_member_id (farm_member_id) — BIGINT — Primary key — NOT NULL
  • Role (role) — VARCHAR(255)
  • Joined_at (joined_at) — DATETIME
  • User_id (user_id) — BIGINT — Foreign key → USER.User_id — NOT NULL
  • Farm_id (farm_id) — BIGINT — Foreign key → FARM.Farm_id — NOT NULL

GROWTH_DIARY (growth_diary)

  • Diary_id (diary_id) — BIGINT — Primary key — NOT NULL
  • Diary_date (diary_date) — DATE
  • Avg_temp (avg_temp) — DECIMAL
  • Avg_humidity (avg_humidity) — DECIMAL
  • Watering_count (watering_count) — INT(100)
  • Summary_text (summary_text) — TEXT
  • Created_at (created_at) — DATETIME
  • Farm_id (farm_id) — BIGINT — Foreign key → FARM.Farm_id — NOT NULL

IMAGE_CAPTURE (image_capture)

  • Capture_id (capture_id) — BIGINT — Primary key — NOT NULL
  • Image_path (image_path) — VARCHAR(255)
  • Captured_at (captured_at) — DATETIME
  • Camera_id (camera_id) — BIGINT — Foreign key → CAMERA.Camera_id — NOT NULL

SCHEDULE (schedule)

  • Schedule_id (schedule_id) — BIGINT — Primary key — NOT NULL
  • Schedule_type (schedule_type) — VARCHAR(255)
  • Name (name) — VARCHAR(255)
  • Enabled (enabled) — BOOLEAN
  • Rule_json (rule_json) — TEXT
  • Created_at (created_at) — DATETIME
  • Farm_id (farm_id) — BIGINT — Foreign key → FARM.Farm_id — NOT NULL

SCHEDULE_RUN (schedule_run)

  • Run_id (run_id) — BIGINT — Primary key — NOT NULL
  • Result_status (result_status) — VARCHAR(255)
  • Result_detail (result_detail) — TEXT
  • Executed_at (executed_at) — DATETIME
  • Schedule_id (schedule_id) — BIGINT — Foreign key → SCHEDULE.Schedule_id — NOT NULL

SENSOR (sensor)

  • Sensor_id (sensor_id) — BIGINT — Primary key — NOT NULL
  • Sensor_type (sensor_type) — VARCHAR(255)
  • Unit (unit) — VARCHAR(255)
  • Install_location (install_location) — VARCHAR(255)
  • Created_at (created_at) — DATETIME
  • Device_id (device_id) — BIGINT — Foreign key → DEVICE.Device_id — NOT NULL

SENSOR_READING (sensor_reading)

  • Reading_id (reading_id) — BIGINT — Primary key — NOT NULL
  • Value (value) — DECIMAL
  • Measured_at (measured_at) — DATETIME
  • Sensor_id (sensor_id) — BIGINT — Foreign key → SENSOR.Sensor_id — NOT NULL

USER (user)

  • User_id (user_id) — BIGINT — Primary key — NOT NULL
  • Email (email) — VARCHAR(255)
  • Password_hash (password_hash) — VARCHAR(255)
  • Name (name) — VARCHAR(255)
  • Created_at (created_at) — DATETIME

VISION_INFERENCE (vision_inference)

  • Inference_id (inference_id) — BIGINT — Primary key — NOT NULL
  • Model_name (model_name) — VARCHAR(255)
  • Task_type (task_type) — VARCHAR(255)
  • Label (label) — VARCHAR(255)
  • Confidence (confidence) — DECIMAL
  • Bbox_json (bbox_json) — TEXT
  • Inferred_at (inferred_at) — DATETIME
  • Capture_id (capture_id) — BIGINT — Foreign key → IMAGE_CAPTURE.Capture_id — NOT NULL