module Avram::SoftDelete::Model
Overview
table do column soft_deleted_at : Time? end end
You should also add the `Avram::SoftDeleteQuery` to your query
```crystal
class ArticleQuery < Article::BaseQuery
include Avram::SoftDelete::Query
end
Defined in:
avram/soft_delete/model.crInstance Method Summary
-
#restore : self
Restore the record
- #save_operation_class
-
#soft_delete : self
Soft delete the record
-
#soft_deleted? : Bool
Returns true if soft deleted, otherwise false
- #soft_deleted_at : Time | Nil
Instance Method Detail
def soft_delete : self
#
Soft delete the record
This will set #soft_deleted_at
to the current time (Time.utc
)
Returns true if soft deleted, otherwise false
If the #soft_deleted_at
has a time value the record is "soft deleted".
If #soft_deleted_at
is nil
the record has not been deleted yet.