```ruby
class Campus < ActiveRecord::Base
  enum mode: { physical: 0, online: 1 }
end
```

Validate the presence of name and mode
user
```ruby
class Campus < ActiveRecord::Base
  validates :name, presence: true
  validates :mode, presence: true

  enum mode: { physical: 0, online: 1 }
end
```
assistant