Версия: 2.0.0
Дата: 2025-11-10
modules:
contacts:
entities: [Contact, Company]
deals:
entities: [Deal, Stage, Pipeline]
# modules/my-module/module.cifra
module:
id: my-module
name: "My Custom Module"
version: "1.0.0"
entities:
- CustomEntity
dependencies:
- contacts
my-plugin/
├── plugin.yaml
├── __init__.py
├── hooks.py
└── ui/
└── widgets.py
plugin:
id: social-media
name: "Social Media Fields"
version: "1.0.0"
entities:
Contact:
fields:
facebook: {type: string}
twitter: {type: string}
hooks:
- event: "entity.Contact.before_save"
handler: "hooks.validate_social_urls"
from cifra.plugins import hook
@hook('entity.Contact.after_create')
async def on_contact_created(contact):
await send_welcome_email(contact.email)
@hook('entity.Deal.stage_changed')
async def on_deal_won(deal, old_stage, new_stage):
if new_stage == 'won':
await create_invoice(deal)
# Search modules
cifra hub search payment
# Install module
cifra hub install stripe-integration
# Publish module
cifra hub publish
Следующий документ: WORKFLOWS_AND_AUTOMATION.md →