mirror of
https://gitee.com/ctexthuang/hyperf_rbac_framework_server_ctexthuang.git
synced 2025-12-25 22:47:50 +08:00
first commit
This commit is contained in:
18
app/Common/Macros/BlueprintMacros.php
Normal file
18
app/Common/Macros/BlueprintMacros.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Common\Macros;
|
||||
|
||||
use Hyperf\Database\Schema\Blueprint;
|
||||
|
||||
class BlueprintMacros
|
||||
{
|
||||
public static function register(): void
|
||||
{
|
||||
Blueprint::macro('authorFields', function () {
|
||||
/** @var Blueprint $this */
|
||||
$this->unsignedBigInteger('created_by')->nullable()->comment('创建人ID');
|
||||
$this->unsignedBigInteger('updated_by')->nullable()->comment('更新人ID');
|
||||
return $this;
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user