backbone-bucket 0.3.0

Bucket Bounded Context: File Storage Module for Backbone Framework
Documentation
//! Domain policy for FileComment aggregate
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! `DomainPolicy` enforces pure business invariants (state-based rules).
//! Identity-based rules live in `backbone_auth::ResourcePolicy`.

use async_trait::async_trait;
use backbone_core::{DomainPolicy, PolicyDecision};
use crate::domain::entity::FileComment;

/// Domain policy for FileComment — enforces business invariants.
pub struct FileCommentDomainPolicy;

#[async_trait]
impl DomainPolicy<FileComment> for FileCommentDomainPolicy {
    // <<< CUSTOM
    // Add entity-specific invariant checks here.
    // Example:
    // async fn can_delete(&self, entity: &FileComment) -> PolicyDecision {
    //     if entity.is_locked {
    //         Err("locked file_comment cannot be deleted".into())
    //     } else { Ok(true) }
    // }
    // END CUSTOM
}