# SharePoint List Schema & RBAC Model (`Demo_Appraisal_2026`)
# SharePoint 清單欄位規格與權限隔離模型

> **Architecture Note**: Built on a single native SharePoint Online list with **Version History** enabled for field-level change traceability, eliminating Dataverse or external audit database dependencies.

---

## 1. Access Control & Permissions (Broken Inheritance RBAC)
## 一、 權限隔離模型（中斷繼承 RBAC）

All regional coordinators, employees, and line managers interact exclusively via Microsoft Forms and Outlook notifications. Direct backend access to `Demo_Appraisal_2026` is restricted via broken inheritance:

| Role / Persona | Account Placeholder | Permission Level | Operational Scope |
| :--- | :--- | :--- | :--- |
| **HR Approver** | `hr-approver@companydemo.com` | **Full Control** | Calibrates scores, enters Section D recommendations, triggers batch approval (`HRApproved`). |
| **HR Support Staff** | `hr-support@companydemo.com` | **Edit** | Verifies intake records, assists with Section D drafting, handles exemption flags (`IsExempt`). |
| **Executive Approver** | `director@companydemo.com` | **Read / View Only** | Reviews `Management Approval Overview` view and version history without edit risk. |
| **General Staff & Line Managers** | `employee@companydemo.com` / `manager@companydemo.com` | **None (Removed)** | No direct list access; Section D HR recommendations remain strictly isolated. |

---

## 2. List Column Definitions
## 二、 清單欄位定義表

| Category | Internal Name | Type | Constraints / Default | Purpose |
| :--- | :--- | :--- | :--- | :--- |
| **Identity & State** | `Title` | Single line of text | **Unique + Indexed** (`DEMO-2026-0001`) | Primary appraisal identifier. |
| | `SubmissionKey` | Single line of text | Indexed (8-char random string) | Record-matching key for external forms. |
| | `Status` | Choice | Indexed (7 stages) | Workflow state machine gate. |
| | `CrossBorderConsent` | Yes/No (Boolean) | Default: `No` | Captures affirmative cross-border consent on `Demo-Form 2`. |
| **Staff & Manager** | `AppraiseeName` / `AppraiseeEmail` | Single line of text | `AppraiseeEmail` Indexed | Regional employee identity & duplicate check key. |
| | `CommencementDate` | Date (Date only) | — | Auto-exempts prior-year goal review if `> 2026-01-01`. |
| | `JobTitle` / `Department` | Single line of text | — | Organizational metadata. |
| | `AppraiserName` / `AppraiserEmail` | Single line of text | `AppraiserEmail` Indexed | HQ manager identity verified via Entra ID. |
| **Attendance** | `AwardsCount`, `VerbalWarnings`, `WarningLetters`, `SickLeaveCount`, `NoPayLeaveCount`, `LateCount`, `LateMinutes` | Number (0 decimals) | Default: `0` | Pre-filled by regional admin in `Demo-Form 1`. |
| **Section A (Self)** | `SelfQ1_1` – `SelfQ1_7` | Multiple lines (Plain text) | 7 columns | Qualitative self-appraisal responses. |
| **Section B (Scoring)** | `SelfQ01` – `SelfQ09` | Number (1 decimal) | Range `0.0–5.0` | Employee self-ratings. |
| | `SupQ01` – `SupQ09` | Number (1 decimal) | Range `0.0–5.0` | Raw manager ratings (`SupQ08` preserved for audit). |
| | `SupQ08_Eff` / `EvidenceMissing` | Number (1 decimal) / Boolean | Default: `No` | Effective Innovation score (`0` if dual-evidence check fails). |
| | `Sub01` – `Sub09` / `Grade01` – `Grade09` | Number (1 decimal) / Text | Deterministic output | Weighted subtotals (`[2,2,2,3,3,3,3,1,1]`) and grades `A–F`. |
| | `TotalScore` | Number (1 decimal) | Max `100.0` | Weighted total score (`<=50` or `>80` triggers reason gate). |
| | `EmpRemark01` – `09` / `SupRemark01` – `09` | Multiple lines (Plain text) | 18 columns | Per-criterion qualitative remarks. |
| **Section C & Sign-off** | `GoalA`, `GoalB`, `GoalC`, `TrainingSuggestion`, `FurtherComments` | Multiple lines (Plain text) | 5 columns | Next-year goals and development feedback. |
| | `ExtremeScoreReason` | Multiple lines (Plain text) | Mandatory if `<=50` or `>80` | Justification for outlier total scores. |
| | `EmpSignName`, `EmpSignDate`, `AppSignName`, `AppSignDate` | Single line of text | 4 columns | Dual-confirmation sign-off records. |
| **Section D & Control** | `HRDSuggestions` | Multiple lines (Plain text) | Isolated from staff/managers | Confidential HR calibration notes. |
| | `HRApproved` / `IsExempt` | Yes/No (Boolean) | Default: `No` | Batch trigger flag / exclusion flag for resigned or long-leave staff. |
| | `ReturnReason` / `RevisionCount` | Plain text / Number (0 dec) | Default: `0` | Tracks two-way return loops and audit reasons. |
