sea-orm-soft-delete 0.1.1

Soft deletes for SeaORM: trash, restore, prune, and queries that skip trashed rows
Documentation
//! Soft deletes for [SeaORM](https://www.sea-ql.org/SeaORM/): a row is moved to the
//! trash by setting `deleted_at`, can be restored, and is pruned for good later.
//!
//! ```
//! # mod posts {
//! #     use sea_orm::entity::prelude::*;
//! #     #[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
//! #     #[sea_orm(table_name = "posts")]
//! #     pub struct Model {
//! #         #[sea_orm(primary_key)]
//! #         pub id: i32,
//! #         pub category_id: i32,
//! #         pub slug: String,
//! #         pub deleted_at: Option<DateTimeWithTimeZone>,
//! #     }
//! #     #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
//! #     pub enum Relation {}
//! # }
//! # impl sea_orm::ActiveModelBehavior for posts::ActiveModel {}
//! use sea_orm::{DatabaseConnection, DbErr, EntityTrait};
//! use sea_orm_soft_delete::{SoftDelete, SoftDeleteModel};
//!
//! impl SoftDelete for posts::Entity {
//!     fn deleted_at_column() -> Self::Column {
//!         posts::Column::DeletedAt
//!     }
//! }
//!
//! async fn example(db: &DatabaseConnection, post: posts::Model) -> Result<(), DbErr> {
//!     let post = post.soft_delete(db).await?; // deleted_at = now
//!     let live = posts::Entity::find_without_trashed().all(db).await?;
//!     let post = post.restore(db).await?; // deleted_at = NULL
//!     Ok(())
//! }
//! # fn main() {}
//! ```
//!
//! `SeaORM` has no global query scopes, so `Entity::find()` still returns trashed
//! rows. Use [`SoftDelete::find_without_trashed`] or
//! [`TrashedQuery::without_trashed`] wherever trashed rows must stay hidden.

mod entity;
mod guard;
mod model;
mod query;
mod row;
mod schema;

pub use entity::SoftDelete;
pub use guard::deny_hard_delete;
pub use model::SoftDeleteModel;
pub use query::TrashedQuery;
pub use schema::{deleted_at_column, unique_while_kept};