netspa_v3

Tables (12)

bag

  • bag_id — UUID — Primary key — NOT NULL
  • serial_number — TEXT — NOT NULL
  • collection_id — UUID — Foreign key → collection_record.collection_id — NOT NULL
  • site_id — UUID — Foreign key → site.site_id — NOT NULL
  • rack_code — VARCHAR(10) — Foreign key → rack.rack_code — 현재
  • status — bag_status — NOT NULL
  • stored_at — TIMESTAMPTZ — NOT NULL — 렉
  • bundle_id — UUID — Foreign key → processing_bundle.bundle_id

collection_plan

  • plan_id — UUID — Primary key — NOT NULL
  • manager_id — UUID — Foreign key → netspa_manager.manager_id — NOT NULL — admin
  • status — plan_status — NOT NULL
  • planned_at — TIMESTAMPTZ — NOT NULL

collection_plan_site

  • plan_id — UUID — Foreign key → collection_plan.plan_id — NOT NULL
  • site_id — UUID — Foreign key → site.site_id — NOT NULL
  • expected_bag_count — INT — 거점

collection_record

  • collection_id — UUID — Primary key — NOT NULL
  • plan_id — UUID — Foreign key → collection_plan.plan_id — NOT NULL
  • manager_id — UUID — Foreign key → netspa_manager.manager_id — NOT NULL — operator
  • total_weight_kg — NUMERIC(10,2) — 전체
  • collected_at — TIMESTAMPTZ — NOT NULL
  • vehicle_number — TEXT
  • discharger_name — TEXT
  • transfer_person_name — TEXT
  • acceptor_name — TEXT
  • waste_type_code — TEXT — NOT NULL — 폐기물코드.
  • processing_method_code — TEXT — 올바로
  • processing_method_name — TEXT
  • olbaro_doc_number — TEXT — 올바로

collection_site_detail

  • detail_id — UUID — Primary key — NOT NULL
  • collection_id — UUID — Foreign key → collection_record.collection_id — NOT NULL
  • site_id — UUID — Foreign key → site.site_id — NOT NULL
  • bag_count — INT — NOT NULL
  • actual_bag_count — INT — 관리자가
  • weight_kg — NUMERIC(10,2) — 해당
  • completed_at — TIMESTAMPTZ — 거점

monthly_archive

  • archive_id — UUID — Primary key — NOT NULL
  • year_month — CHAR(7) — NOT NULL — YYYY-MM
  • collage_url — TEXT
  • total_bag_count — BIGINT
  • total_weight_kg — NUMERIC(12,2)
  • active_site_count — INT
  • created_at — TIMESTAMPTZ — NOT NULL

netspa_manager

  • manager_id — UUID — Primary key — NOT NULL
  • name — TEXT — NOT NULL
  • login_id — TEXT — NOT NULL
  • role — manager_role — NOT NULL — admin:
  • password_hash — TEXT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL

processing_bundle

  • bundle_id — UUID — Primary key — NOT NULL
  • bag_count — INT — NOT NULL
  • processed_at — TIMESTAMPTZ — NOT NULL — 공정
  • processing_method_code — TEXT
  • processing_method_name — TEXT

rack

  • rack_code — VARCHAR(10) — Primary key — NOT NULL
  • max_capacity — INT — NOT NULL

site

  • site_id — UUID — Primary key — NOT NULL
  • site_code — TEXT — NOT NULL — 집하장
  • name — TEXT — NOT NULL
  • region — TEXT — NOT NULL
  • address — TEXT
  • latitude — NUMERIC(9,6) — NOT NULL
  • longitude — NUMERIC(9,6) — NOT NULL
  • pin_hash — TEXT — NOT NULL — 6자리
  • created_at — TIMESTAMPTZ — NOT NULL

site_bag_queue

  • queue_id — UUID — Primary key — NOT NULL
  • site_id — UUID — Foreign key → site.site_id — NOT NULL
  • record_id — UUID — NOT NULL
  • original_bag_count — INT — NOT NULL
  • remaining_bag_count — INT — NOT NULL
  • bag_image_url — TEXT — NOT NULL
  • queued_at — TIMESTAMPTZ — NOT NULL — FIFO
  • is_fully_collected — BOOLEAN — NOT NULL

vessel

  • vessel_id — UUID — Primary key — NOT NULL
  • name — TEXT — NOT NULL
  • created_at — TIMESTAMPTZ — NOT NULL