syntax = "proto3";

package common.pbound.v1;

option go_package = "github.com/tech/sendico/pkg/proto/common/permission_bound/v1;pboundv1";

import "api/proto/common/storable/v1/storable.proto";
import "api/proto/common/archivable/v1/archivable.proto";
import "api/proto/common/organization_bound/v1/obound.proto";

// PermissionBound bundles persistence metadata, soft-delete state,
// organisation ownership, and an RBAC permission reference.
message PermissionBound {
  // storable carries the record's persistence metadata.
  common.storable.v1.Storable storable = 1;
  // archivable carries the soft-delete flag.
  common.archivable.v1.Archivable archivable = 2;
  // organization_bound ties the record to an organisation.
  common.obound.v1.OrganizationBound organization_bound = 3;
  // permission_ref is the RBAC permission identifier that governs access.
  string permission_ref = 4;
}
