crud-model

Official

Robust multi-tenant GORM model standards.

AuthorArtisanCloud
Version1.0.0
Installs0

System Documentation

What problem does it solve?

PowerX CRUD Model standardizes GORM models to support multi-tenant data, consistent naming, and streamlined migrations, reducing drift between modules.

Core Features & Use Cases

  • Embeds PowerModel/PowerUUIDModel and includes TenantID and DeletedAt to enable multi-tenant isolation and soft deletion.
  • Enforces table naming returning schema-qualified names via TableName() and uses the PowerXSchema constant.
  • Standardizes JSON fields with datatypes.JSON (JSONB) and provides status field with default value and indexing.
  • Integrates with module migrations by providing a Migrate<Module>Models function and central migrate entry to run AutoMigrate.

Quick Start

Create a new GORM model that follows the embedded PowerModel/PowerUUIDModel, ensuring TenantID, DeletedAt, and Status fields, and register its migration with the module's AutoMigrate entry.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: crud-model
Download link: https://github.com/ArtisanCloud/PowerX/archive/main.zip#crud-model

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.