kraken

Tables (27)

activity_logs

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • action_type — text — NOT NULL
  • action_category — text — NOT NULL
  • description — text — NOT NULL
  • metadata — jsonb
  • ip_address — text
  • user_agent — text
  • created_at — timestamp — NOT NULL

alumni

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • alumni_id — text — NOT NULL
  • graduation_date — date
  • current_employer — text
  • role_title — text
  • contact_email — text
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

announcement_comments

  • id — uuid — Primary key — NOT NULL
  • announcement_id — uuid — NOT NULL
  • user_id — uuid — NOT NULL
  • content — text — NOT NULL
  • created_at — timestamp
  • updated_at — timestamp

announcement_reactions

  • id — uuid — Primary key — NOT NULL
  • announcement_id — uuid — NOT NULL
  • user_id — uuid — NOT NULL
  • reaction_type — text — NOT NULL
  • created_at — timestamp

announcements

  • id — uuid — Primary key — NOT NULL
  • title — text — NOT NULL
  • body — text — NOT NULL
  • author_id — uuid — NOT NULL
  • audience_type — text — NOT NULL
  • target_years — ARRAY
  • target_sections — ARRAY
  • is_pinned — boolean
  • created_at — timestamp
  • updated_at — timestamp

attendance

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • event_id — uuid — NOT NULL
  • session_window_id — uuid — NOT NULL
  • status — USER-DEFINED — NOT NULL
  • attended_time — timestamp
  • scanned_by_user_id — uuid
  • image_path — text
  • excuse_reason — text
  • excused_by_user_id — uuid
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

borrow_records

  • id — uuid — Primary key — NOT NULL
  • item_id — uuid — NOT NULL
  • borrower_id — uuid — NOT NULL
  • request_id — uuid
  • borrow_date — timestamp — NOT NULL
  • expected_return_date — timestamp — NOT NULL
  • return_date — timestamp
  • condition_on_borrow — text — NOT NULL
  • condition_on_return — text
  • borrow_notes — text
  • return_notes — text
  • borrowed_by_admin_id — uuid
  • returned_by_admin_id — uuid
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

borrow_requests

  • id — uuid — Primary key — NOT NULL
  • item_id — uuid — NOT NULL
  • requester_id — uuid — NOT NULL
  • expected_return_date — timestamp — NOT NULL
  • purpose — text — NOT NULL
  • status — USER-DEFINED — NOT NULL
  • reviewed_by_user_id — uuid
  • reviewed_at — timestamp
  • rejection_reason — text
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

budget_approvals

  • id — uuid — Primary key — NOT NULL
  • transaction_id — uuid — NOT NULL
  • student_id — uuid — NOT NULL
  • student_response — character
  • student_responded_at — timestamp
  • admin_id — uuid
  • created_at — timestamp
  • updated_at — timestamp

budget_transactions

  • id — uuid — Primary key — NOT NULL
  • transaction_type — character — NOT NULL
  • amount_cents — integer — NOT NULL
  • source — character
  • category — character
  • description — text — NOT NULL
  • reference_id — uuid
  • reference_type — character
  • requested_by_student_id — uuid
  • approved_by_admin_id — uuid
  • status — character — NOT NULL
  • transaction_date — timestamp
  • created_at — timestamp
  • updated_at — timestamp
  • notes — text
  • receipt_url — text
  • receipt_uploaded_at — timestamp
  • proof_verified — boolean
  • proof_verified_by_admin_id — uuid
  • proof_verified_at — timestamp
  • proof_verification_notes — text
  • completion_status — character

charges

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • event_id — uuid
  • title — text — NOT NULL
  • amount_cents — integer — NOT NULL
  • outstanding_cents — integer — NOT NULL
  • status — text — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

event_sessions

  • id — uuid — Primary key — NOT NULL
  • event_id — uuid — NOT NULL
  • session_period — USER-DEFINED — NOT NULL
  • is_active — boolean — NOT NULL
  • in_fine_cents — integer
  • out_fine_cents — integer
  • created_at — timestamp — NOT NULL

events

  • id — uuid — Primary key — NOT NULL
  • status — USER-DEFINED — NOT NULL
  • image_path — text
  • name — character — NOT NULL
  • event_date — date — NOT NULL
  • duration — text — NOT NULL
  • half_period — USER-DEFINED
  • target_years — text
  • fine_per_absent_default — integer — NOT NULL
  • location — character
  • description — text
  • created_by_user_id — uuid
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

excuses

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • event_id — uuid — NOT NULL
  • reason — text — NOT NULL
  • status — USER-DEFINED — NOT NULL
  • created_at — timestamp — NOT NULL
  • reviewed_at — timestamp
  • reviewed_by_user_id — uuid
  • review_note — text

faculty

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • faculty_id — text — NOT NULL
  • is_program_head — boolean — NOT NULL
  • hired_date — date
  • rank — text
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

fee_assignments

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • fee_id — uuid — NOT NULL
  • outstanding_cents — integer — NOT NULL
  • status — text — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

feedback

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • type — text — NOT NULL
  • subject — text — NOT NULL
  • message — text — NOT NULL
  • status — text — NOT NULL
  • admin_response — text
  • responded_by_admin_id — uuid
  • responded_at — timestamp
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

fees

  • id — uuid — Primary key — NOT NULL
  • title — text — NOT NULL
  • description — text
  • amount_cents — integer — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

fine_payments

  • id — uuid — Primary key — NOT NULL
  • fine_id — uuid — NOT NULL
  • user_id — uuid — NOT NULL
  • amount_cents — integer — NOT NULL
  • method — text — NOT NULL
  • reference — text
  • paid_by_user_id — uuid — NOT NULL
  • created_at — timestamp — NOT NULL

fines

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • total_fines_cents — integer — NOT NULL
  • paid_cents — integer — NOT NULL
  • outstanding_cents — integer
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

inventory_items

  • id — uuid — Primary key — NOT NULL
  • code — text — NOT NULL
  • name — text — NOT NULL
  • description — text — NOT NULL
  • type — USER-DEFINED — NOT NULL
  • status — USER-DEFINED — NOT NULL
  • is_important — boolean — NOT NULL
  • quantity — integer
  • low_stock_threshold — integer
  • category — text
  • location — text
  • serial_number — text
  • photo_url — text
  • purchase_date — timestamp
  • vendor — text
  • price_cents — integer
  • warranty_expiry — timestamp
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

legal_documents

  • id — uuid — Primary key — NOT NULL
  • document_type — character — NOT NULL
  • title — character — NOT NULL
  • content — text — NOT NULL
  • version — integer — NOT NULL
  • last_edited_by — uuid
  • last_edited_at — timestamp
  • created_at — timestamp
  • updated_at — timestamp

payments

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • charge_id — uuid
  • method — text — NOT NULL
  • amount_cents — integer — NOT NULL
  • reference — text
  • paid_by_user_id — uuid
  • created_at — timestamp — NOT NULL
  • fee_assignment_id — uuid

return_requests

  • id — uuid — Primary key — NOT NULL
  • borrow_record_id — uuid — NOT NULL
  • item_id — uuid — NOT NULL
  • borrower_id — uuid — NOT NULL
  • condition_on_return — text — NOT NULL
  • return_notes — text
  • status — USER-DEFINED — NOT NULL
  • reviewed_by_user_id — uuid
  • reviewed_at — timestamp
  • rejection_reason — text
  • admin_notes — text
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

session_windows

  • id — uuid — Primary key — NOT NULL
  • event_session_id — uuid — NOT NULL
  • window_type — USER-DEFINED — NOT NULL
  • scheduled_time — time
  • opened_by_user_id — uuid
  • closed_by_user_id — uuid
  • opened_at — timestamp
  • closed_at — timestamp
  • session_number — integer

students

  • id — uuid — Primary key — NOT NULL
  • user_id — uuid — NOT NULL
  • student_id — text — NOT NULL
  • is_officer — boolean — NOT NULL
  • position — text
  • year_level — USER-DEFINED — NOT NULL
  • enrolled_at — date
  • status — text — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL

users

  • id — uuid — Primary key — NOT NULL
  • username — text — NOT NULL
  • password — text — NOT NULL
  • auth_code — text
  • email — text
  • first_name — text — NOT NULL
  • middle_name — text
  • last_name — text — NOT NULL
  • phone — text
  • profile_image — text
  • bio — text
  • gender — USER-DEFINED — NOT NULL
  • date_of_birth — date
  • is_admin — boolean — NOT NULL
  • created_at — timestamp — NOT NULL
  • updated_at — timestamp — NOT NULL