incompass/软删除包

为 Doctrine 实体添加简单的软删除功能

安装次数: 41,325

依赖者: 0

建议者: 0

安全性: 0

星标: 0

关注者: 9

分支: 0

类型:symfony-bundle

v3.0.0 2023-01-20 19:46 UTC

This package is auto-updated.

Last update: 2023-09-20 21:18:02 UTC


README

Build Status Total Downloads Latest Stable Version

SoftDeletableBundle

此包允许您简单地通过在 doctrine 实体类中实现 implements SoftDeleteInterfaceuse SoftDeleteTrait 来启用软删除。

安装

Composer

composer require incompass/soft-deletable-bundle

使用方法

实现 SoftDeleteInterface。

class Entity implements SoftDeleteInterface {}

将 SoftDeleteTrait 特性添加到您的 doctrine 实体中。

use SoftDeleteTrait

更新您的数据库模式

php bin/console doctrine:schema:update --force

实体在软删除时将存储 deleted_at 日期时间。

贡献者

Joe Mizzi (casechek/incompass) Mike Bates (casechek/incompass)