Files
ksif-manage-back/.agent/references/content-and-files.md

2.6 KiB

Notice / Popup

  • 0 center mappings = all Centers.
  • 1+ mappings = mapped Centers only.
  • Use soft delete where provided.
  • Store Center-level view history separately in t_notice_view and t_popup_view; target mapping tables describe visibility only.
  • Record a Notice or Popup view for the current Center without changing its target mappings.
  • A viewed active Popup remains eligible for subsequent responses; view history is informational and does not suppress it.
  • Popup periods are entered and stored with minute precision. Active lookup uses start_dt <= now and end_dt > now - 1 minute, so the selected start minute begins normally and the selected end minute remains active through its final second.
  • Notice and Popup bodies contain Tiptap HTML. Store and return the HTML unchanged and do not add a backend HTML-sanitizer dependency for the current scope.
  • Admin roles create, update, and delete Notices and Popups. Center users may read only content visible to their own Center.

Q&A

  • Question 1 : Answer 0..1.
  • On first Center-user answer view, set: is_view_answer, view_user, view_dt.
  • Center users may access only their own Center's questions.
  • A Center may not update or delete a Question while it has an active Answer.
  • Admin roles may create, update, and delete an Answer only until a Center user has viewed it.
  • Once is_view_answer = 1, the Answer may no longer be updated or deleted.
  • Use soft delete for Questions and Answers where provided.

Files

  • Max 5 files.
  • Max 5 MB each.
  • Reject .exe.
  • Separate storage locations: notice, qna-question, qna-answer.

Pagination

  • Use KriCommon PageResponseDto for Notice, Q&A Question, and Admin Popup lists.
  • Default to page = 0, size = 20, ordered by registration date descending.
  • Apply role, Center, target, and soft-delete filters in the database query before pagination.
  • Their POST .../search bodies extend the shared page request with optional searchKeyword and targetCenterCds. Match searchKeyword against the row ID, title, or registration user with OR-connected contains searches. Match targetCenterCds with IN semantics; always include rows targeting all Centers (0 for Q&A and no target mappings for Notice/Popup). Null or empty filters apply no additional restriction.
  • Q&A Question list sorting additionally accepts virtual fields answerDt and viewDt. Sort answerDt by the active Answer's reg_dt and viewDt by the active Answer's view_dt, using a left join so Questions without an Answer or Answer view remain in the page result.
  • Report endpoints do not use pagination.