A document file defines the database behavior of a module. The constant file describes the data shape, while the document file explains how to query, mutate, load, index, and operate on stored documents.
A normal document file usually contains search conditions, document-level behavior, and database model helpers used by services.