domain-modeling

Create and maintain business domain models with entities, relationships, business rules, and permission structures.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "domain-modeling" with this command: npx skills add thapaliyabikendra/ai-artifacts/thapaliyabikendra-ai-artifacts-domain-modeling

Domain Modeling

Create and maintain business domain models with entities, relationships, business rules, and permission structures.

When to Use

  • Creating new entity definitions

  • Defining business rules (BR-XXX format)

  • Designing permission and role structures

  • Analyzing impact of domain changes

  • Maintaining docs/domain/ documentation

Entity Definition Template

{Entity} Entity

Aggregate Root: Yes/No Base Class: FullAuditedAggregateRoot<Guid> Table: {Entities}

Description

[Purpose of this entity in the domain]

Properties

PropertyTypeRequiredConstraintsDescription
IdGuidYesPKUnique identifier
NamestringYesMaxLength(100)Display name
EmailstringYesEmail format, UniqueContact email
Status{Entity}StatusYesEnumCurrent state
CreatedAtDateTimeYesAuto-setCreation timestamp

Relationships

RelationshipTypeTarget EntityFK ColumnDescription
ParentN:1{ParentEntity}{Parent}IdBelongs to parent
Children1:N{ChildEntity}-Has many children

Business Rules

Rule IDRuleValidation Point
BR-{CAT}-001[Rule description][When validated]

State Transitions

[Initial] → [State1] → [State2] → [Final] ↓ [Cancelled]

API Access

OperationPermissionRoles
List{Project}.{Entities}Admin, User
View{Project}.{Entities}Admin, User
Create{Project}.{Entities}.CreateAdmin
Update{Project}.{Entities}.EditAdmin
Delete{Project}.{Entities}.DeleteAdmin

Sample Data

IdNameStatus
{guid}Example 1Active

Business Rule Format

Rule ID Convention

BR-{CATEGORY}-{NUMBER}

Categories:

  • PAT: Patient rules
  • DOC: Doctor rules
  • APT: Appointment rules
  • SCH: Schedule rules
  • MED: Medical record rules
  • SYS: System-wide rules

Rule Documentation

IDRuleEnforcementImpact
BR-APT-001Appointments cannot overlap for same doctorCreate/UpdateReject with error
BR-APT-002Appointments must be within doctor scheduleCreateReject with error
BR-PAT-001Patient email must be uniqueCreate/UpdateReject with error

Rule Template (Detailed)

BR-{CAT}-{NNN}: {Rule Name}

Description: [What the rule enforces] Trigger: [When this rule applies] Condition: [The logic to evaluate] Action: [What happens when condition is met/not met] Exception: [Any exceptions to this rule] Related: [Related rules or entities]

Permission Structure

Naming Convention

{ProjectName}.{Resource}.{Action}

Actions:

  • (none) = Default/View
  • Create
  • Edit
  • Delete
  • {Custom} = Domain-specific actions

Permission Table Template

{Resource} Permissions

PermissionDescriptionRoles
{Project}.{Resources}View {resources}Admin, Manager, User
{Project}.{Resources}.CreateCreate new {resource}Admin, Manager
{Project}.{Resources}.EditModify {resource}Admin, Manager
{Project}.{Resources}.DeleteDelete {resource}Admin
{Project}.{Resources}.{Custom}[Custom action][Specific roles]

Role Definition Template

{Role}

Description: [Role purpose and scope]

Capabilities

  • [Capability 1]
  • [Capability 2]
  • [Capability 3]

Permissions

ResourceViewCreateEditDeleteCustom
Patients--
Doctors----

Restrictions

  • [What this role cannot do]
  • [Scope limitations]

Impact Analysis Template

Impact Analysis: {Feature Name}

Summary

MetricCount
New EntitiesX
Modified EntitiesY
New Business RulesZ
Modified Business RulesW
New PermissionsN
Risk LevelLow/Medium/High

Entity Changes

New Entities

EntityReasonRelationships
{Entity}[Why needed][Related to...]

Modified Entities

EntityChangeBeforeAfterReason
{Entity}New property-{Prop}: {Type}[Why]
{Entity}New relationship-{Nav}: {Target}[Why]

Business Rule Changes

New Rules

IDRuleJustification
BR-XXX-001[Rule][Why needed]

Modified Rules

IDBeforeAfterReasonRisk
BR-XXX-001[Old rule][New rule][Why]Medium

Permission Changes

PermissionRolesJustification
{Project}.{Resource}.{Action}[Roles][Why needed]

Affected Components

ComponentImpactAction Required
{Entity}AppService[Change type][Create/Modify]

Test Impact

Existing TestImpactAction
{Test}_Tests[Breaking/None][Update/None]

Risks & Concerns

ConcernSeverityMitigation
[Issue]Low/Medium/High[How to address]

Stakeholder Sign-off Required

  • Product Owner - [What needs approval]
  • Tech Lead - [What needs approval]
  • Security - [What needs approval]

Relationship Patterns

One-to-Many (1:N)

Parent Entity Child Entity ┌─────────────┐ ┌─────────────┐ │ Doctor │ 1 ────── N │ Appointment │ │ │ │ DoctorId │ └─────────────┘ └─────────────┘

Many-to-Many (M:N via junction)

Entity A Junction Entity B ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ Patient │ 1 ──── N │ PatientTag │ N ──── 1 │ Tag │ │ │ │ PatientId │ │ │ │ │ │ TagId │ │ │ └─────────────┘ └─────────────┘ └─────────────┘

Quality Checklist

Entity Definition

  • All properties have type and constraints

  • Relationships clearly defined with FK

  • Business rules listed with BR-XXX IDs

  • API access permissions mapped

  • Sample data provided

Business Rules

  • Uses BR-{CAT}-{NNN} format

  • Enforcement point specified

  • Impact of violation documented

  • Cross-referenced in entity files

Permissions

  • Follows naming convention

  • Mapped to appropriate roles

  • Custom actions documented

References

  • references/entity-examples.md - Real entity examples

  • references/rule-patterns.md - Common business rule patterns

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

abp-infrastructure-patterns

No summary provided by upstream source.

Repository SourceNeeds Review
General

abp-entity-patterns

No summary provided by upstream source.

Repository SourceNeeds Review
General

abp-api-implementation

No summary provided by upstream source.

Repository SourceNeeds Review
General

abp-service-patterns

No summary provided by upstream source.

Repository SourceNeeds Review