ecto-schema-patterns
OfficialDesign robust Elixir data models with advanced Ecto patterns.
Software Engineering#multi-tenancy#data modeling#associations#elixir#ecto#embedded schemas#schema patterns
AuthorTheBushidoCollective
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides advanced Ecto schema patterns to define robust data structures for complex Elixir applications, covering intricate field types, associations, and schema metadata. It automates the application of sophisticated data modeling techniques.
Core Features & Use Cases
- Flexible Field Types: Utilize
:mapand{:array, :type}for unstructured or list data, and virtual fields for computed or temporary values. - Advanced Associations: Implement
many_to_manywith join tables or dedicated join schemas, and self-referencing associations for hierarchical data. - Custom Primary Keys & Prefixes: Define custom primary keys (e.g., UUIDs, composite keys) and use schema prefixes for multi-tenant applications.
- Use Case: You're building an e-commerce platform where products can have multiple tags and users can belong to multiple organizations with specific roles. Use this Skill to define a
many_to_manyrelationship betweenProductandTag, and amany_to_manywith a join schema forUserandOrganizationto store the user'srolewithin each organization, ensuring a flexible and accurate data model.
Quick Start
Use the ecto-schema-patterns skill to define a Product schema with a custom primary key sku of type :string.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 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: ecto-schema-patterns Download link: https://github.com/TheBushidoCollective/han/archive/main.zip#ecto-schema-patterns Please download this .zip file, extract it, and install it in the .claude/skills/ directory.