class Contact
- Contact
- Reference
- Object
Included Modules
- DB::Mappable
Defined in:
models/contact.crConstructors
-
.find_by_id!(id) : Contact
Returns a Contact by ID
- .new(__temp_129 : DB::ResultSet)
Class Method Summary
-
.all(offset : Int32 = 0, limit : Int32 = 10) : Array(Contact)
Returns all Contacts
- .count : Int64
-
.find_by_email?(email : String) : Contact | Nil
Returns a Contact by email
-
.find_by_id?(id) : Contact | Nil
Returns a Contact by ID or nil
- .from_rs(__temp_129 : DB::ResultSet)
-
.search(term : String, offset : Int32 = 0, limit : Int32 = 10) : Array(Contact)
Returns Top 10 Contacts based on search term
Instance Method Summary
- #created_at : Time
- #created_at=(_created_at : Time)
- #email : String
- #email=(_email : String)
- #first : String?
- #first=(_first : Union(String, Nil) | Nil)
- #id : Int64
- #id=(_id : Int64)
- #last : String?
- #last=(_last : Union(String, Nil) | Nil)
- #phone : String?
- #phone=(_phone : Union(String, Nil) | Nil)
- #updated_at : Time
- #updated_at=(_updated_at : Time)
Constructor Detail
Class Method Detail
Returns all Contacts
Returns Top 10 Contacts based on search term