backbone-bucket 0.3.1

Bucket Bounded Context: File Storage Module for Backbone Framework
Documentation
//! Domain policy for FileLock 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::FileLock;

/// Domain policy for FileLock — enforces business invariants.
pub struct FileLockDomainPolicy;

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