module Jennifer::Model::Timestamp
Direct including types
Defined in:
jennifer/model/timestamp.crMacro Summary
- 
        with_timestamps(created_at = true, updated_at = true)
        
          
Adds callbacks for
created_atandupdated_atfields. 
Macro Detail
Adds callbacks for created_at and updated_at fields.
class MyModel < Jennifer::Model::Base
  with_timestamps
  mapping(
    id: {type: Int32, primary: true},
    created_at: {type: Time, null: true},
    updated_at: {type: Time, null: true}
  )
end