{ "module": "mongo_ops.models", "content": { "path": "mongo_ops.models", "docstring": "# Summary\n\nBase document models for MongoDB.", "objects": { "PyObjectId": { "name": "PyObjectId", "kind": "class", "path": "mongo_ops.models.PyObjectId", "signature": null, "docstring": "Custom ObjectId type compatible with Pydantic v2.\n\nThis class extends the standard BSON ObjectId to provide validation and\nserialization support within Pydantic models.", "members": { "validate": { "name": "validate", "kind": "function", "path": "mongo_ops.models.PyObjectId.validate", "signature": "validate(v: Any) -> ObjectId", "docstring": "Validate the input value and convert it to an ObjectId if possible.\n\nArgs:\n v (Any): The value to validate (can be str or ObjectId).\n\nReturns:\n ObjectId: The validated ObjectId instance.\n\nRaises:\n ValueError: If the value is not a valid ObjectId." } } }, "BaseDocument": { "name": "BaseDocument", "kind": "class", "path": "mongo_ops.models.BaseDocument", "signature": null, "docstring": "Base document class with common MongoDB fields.\n\nInherit from this class to create Pydantic models that represent\nMongoDB documents. It includes automatic handling of the `_id` field\nand timestamps.\n\nAttributes:\n id: The MongoDB document ID (aliased to `_id`).\n created_at: Timestamp when the document was created.\n updated_at: Timestamp when the document was last updated.", "members": { "id": { "name": "id", "kind": "attribute", "path": "mongo_ops.models.BaseDocument.id", "signature": null, "docstring": null }, "created_at": { "name": "created_at", "kind": "attribute", "path": "mongo_ops.models.BaseDocument.created_at", "signature": null, "docstring": null }, "updated_at": { "name": "updated_at", "kind": "attribute", "path": "mongo_ops.models.BaseDocument.updated_at", "signature": null, "docstring": null }, "Config": { "name": "Config", "kind": "class", "path": "mongo_ops.models.BaseDocument.Config", "signature": null, "docstring": null, "members": { "populate_by_name": { "name": "populate_by_name", "kind": "attribute", "path": "mongo_ops.models.BaseDocument.Config.populate_by_name", "signature": null, "docstring": null }, "arbitrary_types_allowed": { "name": "arbitrary_types_allowed", "kind": "attribute", "path": "mongo_ops.models.BaseDocument.Config.arbitrary_types_allowed", "signature": null, "docstring": null }, "json_encoders": { "name": "json_encoders", "kind": "attribute", "path": "mongo_ops.models.BaseDocument.Config.json_encoders", "signature": null, "docstring": null }, "json_schema_extra": { "name": "json_schema_extra", "kind": "attribute", "path": "mongo_ops.models.BaseDocument.Config.json_schema_extra", "signature": null, "docstring": null } } } } } } } }