mirror of
https://github.com/BillyOutlast/UNIT3D.git
synced 2026-02-04 03:01:20 +01:00
add: donation transaction encryption
This commit is contained in:
@@ -16,6 +16,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Traits\Encryptable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -35,6 +36,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Donation extends Model
|
||||
{
|
||||
use Encryptable;
|
||||
|
||||
final public const int PENDING = 0;
|
||||
final public const int APPROVED = 1;
|
||||
final public const int REJECTED = 2;
|
||||
@@ -67,6 +70,15 @@ class Donation extends Model
|
||||
*/
|
||||
protected $guarded = ['id'];
|
||||
|
||||
/**
|
||||
* The Attributes That Are Encrypted.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected array $encryptable = [
|
||||
'transaction',
|
||||
];
|
||||
|
||||
/**
|
||||
* Belongs To A User.
|
||||
*
|
||||
|
||||
@@ -30,7 +30,7 @@ return new class () extends Migration {
|
||||
$table->unsignedInteger('gifted_user_id')->nullable()->index();
|
||||
$table->tinyInteger('status')->default(0);
|
||||
$table->unsignedInteger('package_id')->index();
|
||||
$table->string('transaction');
|
||||
$table->text('transaction');
|
||||
$table->boolean('is_gifted')->default(false);
|
||||
$table->date('starts_at')->nullable();
|
||||
$table->date('ends_at')->nullable();
|
||||
|
||||
Reference in New Issue
Block a user