```ruby
class Import < Sequel::Model
  set_dataset :resets
  one_to_many :alerts_offences

  plugin :timestamps

  def duration
    if self.updated_at
      self.updated_at - self.created_at
    else
      -1
    end
  end
end
```

Upgrade syntax for using Sequel
user
```ruby
class Import < Sequel::Model(:resets)
  one_to_many :alerts_offences

  plugin :timestamps

  def duration
    if self.updated_at
      self.updated_at - self.created_at
    else
      -1
    end
  end
end
```
assistant