Skip to content

add file AgentBadge-Verifivaction.md - #12

Merged
Ahmad7757 merged 1 commit into
mainfrom
feat/new-file
Jun 12, 2026
Merged

Ahmad7757 merged 1 commit into
mainfrom
feat/new-file

Conversation

@Ahmad7757

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 12, 2026 13:09
@Ahmad7757
Ahmad7757 merged commit 9b558ea into main Jun 12, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new requirements/specification document describing the “Professional Agent” badge (trust score + granting/revoking) and a property listing verification workflow (verification requests, statuses, and supporting documents). This fits into the repository’s existing set of product/API/database documentation markdown files.

Changes:

  • Introduces user stories plus acceptance criteria/edge cases for agent badge and property verification flows.
  • Documents example API endpoints for creating/revoking agent badges.
  • Proposes database entities for trust metrics, agent badges, verification requests, users, and companies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,234 @@
# 1. User Stories
* **Edge Cases:**
* Admin attempts to set `is_verified` = `TRUE` without uploaded documents -> the system prevents the action or displays a confirmation warning.

# 3. API Endpoints (Login & Roles)
# 3. API Endpoints (Login & Roles)

## 1. Create Agent Badge
* **Endpoint:** POST /agent-badges
```

## 2. Revoke Agent Badge
* **Endpoint:** PUT /agent-badges/{id}
## 1. Create Agent Badge
* **Endpoint:** POST /agent-badges
* **Description:** Creates a "Professional Agent" badge and assigns it to a specific agent.
* **Headers:** Host: Shaqqa.com, Accept: application/json
Comment on lines +141 to +149
{
"id": "1",
"agent_id": "12",
"granted_by": "845",
"badge_name": "Professional Agent",
"status": "active",
"granted_at": "2026-04-29T10:00:00Z",
"granted_at_score": 82.5
}
* Upon resubmission, status returns to `PENDING` and a new review cycle begins.
* `reviewed_by` and `reviewed_at` are updated with each admin action.
* **Edge Cases:**
* User ignores `NEEDS_EDIT` for a long period -> the listing is automatically deleted.
Comment on lines +44 to +45
* The badge is automatically revoked when `trust_score` drops to <= `70`.
* `revoked_by`, `revoked_at`, and `revoked_at_score` are recorded.
* **`email`** (VARCHAR, UNIQUE): Unique email address of the user.
* **`phone`** (VARCHAR): Contact phone number.
* **`password_hash`** (VARCHAR): Encrypted password hash for authentication.
* **`role`** (ENUM): The role of the user (`REGULAR`, `AGENT`, `COMPANY_ADMIN`, `ADMIN`).
Comment on lines +183 to +189
## 1. Table: `RealEstateCompany`
* **`id`** (PK): Unique identifier for the real estate company.
* **`name`** (VARCHAR): Name of the real estate company.
* **`license_number`** (VARCHAR, UNIQUE): Unique license number of the company.
* **`logo_url`** (VARCHAR): URL path for the company logo.
* **`verified`** (BOOLEAN): `TRUE` if the company is verified.
* **`created_at`** (TIMESTAMP): Timestamp indicating when the record was created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants