```ruby
class Section
  include Mongoid::Document
  include Mongoid::Timestamps

  field :name
  field :sort, type: Integer, default: 0

  has_many :nodes, dependent: :destroy
end
```

Use the default_scope macro to set a default scope for all operations on the model.
user
```ruby
class Section
  include Mongoid::Document
  include Mongoid::Timestamps

  field :name
  field :sort, type: Integer, default: 0

  has_many :nodes, dependent: :destroy

  default_scope { desc(:sort) }

end
```
assistant