Project

General

Profile

Actions

Task #177

open

C2B State Master

Added by Dana Basheer about 2 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
High
Assignee:
Start date:
03/16/2026
Due date:
03/16/2026 (50 days late)
% Done:

0%

Estimated time:

Description

This module is used to manage state details in the system. Each state belongs to a specific country. The state records will be used in other modules such as district master and location master to maintain geographic hierarchy. Only active states should be available for selection in dependent modules.

Table

c2b_state_master

  • state_id (PK) INT AUTO_INCREMENT Unique state ID
  • country_id (FK) INT References c2b_country_master.country_id
  • state_name VARCHAR(150) Name of the state
  • state_code VARCHAR(10) Short code for the state
  • is_active BOOLEAN DEFAULT TRUE Active / inactive status
  • created_at DATETIME Record created date
  • updated_at DATETIME Record updated date

Validations

  • country_id required
  • state_name required
  • state_code required

Country

  • country_id must exist in c2b_country_master
  • country must be active

State Name

  • Minimum 2 characters
  • Maximum 150 characters
  • Cannot be empty

State Code

  • Maximum 10 characters
  • Usually uppercase
  • Must be unique within the country

Duplicate

Prevent duplicate state in the same country.

Edit

Allow edit:

  • state_name
  • state_code
  • is_active

Do NOT allow edit:

  • country_id

Delete Rule

  • Soft delete only.

Set:

  • is_active = FALSE

Do not delete record permanently.

Actions

Also available in: Atom PDF