package constants

// VirtualFieldKind enumerates the kinds of virtual (non-physical) fields a
// schema may expose. A virtual field has no physical column in the object's
// storage table; its value is projected from another source by the handler
// named by its kind. Physical SQL paths must skip virtual fields (see
// models.PersistableFields); logical paths (validation, canonicalization,
// FLS, describe) consume them via models.LogicalFields.
//
// Adding a new kind requires a matching handler that knows how to (a)
// intercept writes for that kind's fields and route them to the backing
// store, and (b) project reads from the backing store into the record
// under the field's wire-shape APIName.
const (
	// VirtualFieldSystemPermission marks a PermissionSet virtual field
	// (e.g. "PermissionsViewSetup") that projects a grant row from the
	// _System_PermissionSetPermission junction. FieldMetadata.VirtualSourceAPIName
	// carries the underlying permission APIName (e.g. "ViewSetup") — the
	// catalog key, without the "Permissions" wire-shape prefix.
	VirtualFieldSystemPermission = "SystemPermission"

	// VirtualFieldCompound marks a read-only field whose value is synthesized
	// from same-record component fields declared on FieldMetadata.ComposedFrom.
	// It has no storage column; query paths fetch the component fields and
	// project the compound value after hydration.
	VirtualFieldCompound = "Compound"
)
