Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
更新:默认模板优化
- Loading branch information
1 parent
21b4461
commit 33f79fc
Showing
8 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
declare (strict_types=1); | ||
namespace App\Plugins\User\src\Models; | ||
|
||
use App\Model\Model; | ||
use Carbon\Carbon; | ||
|
||
/** | ||
* @property int $id | ||
* @property string $user_id | ||
* @property string $old | ||
* @property string $new | ||
* @property Carbon $created_at | ||
* @property Carbon $updated_at | ||
*/ | ||
class UserUsernameChangerLog extends Model | ||
{ | ||
/** | ||
* The table associated with the model. | ||
* | ||
* @var string | ||
*/ | ||
protected $table = 'user_username_changer_log'; | ||
/** | ||
* The attributes that are mass assignable. | ||
* | ||
* @var array | ||
*/ | ||
protected $fillable = ['id','user_id','old','new','created_at','updated_at']; | ||
/** | ||
* The attributes that should be cast to native types. | ||
* | ||
* @var array | ||
*/ | ||
protected $casts = ['id' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime']; | ||
} |
30 changes: 30 additions & 0 deletions
30
app/Plugins/User/src/migrations/2022_04_06_183105_create_user_username_change_log.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
use Hyperf\Database\Schema\Schema; | ||
use Hyperf\Database\Schema\Blueprint; | ||
use Hyperf\Database\Migrations\Migration; | ||
|
||
class CreateUserUsernameChangeLog extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
Schema::create('user_username_changer_log', function (Blueprint $table) { | ||
$table->bigIncrements('id'); | ||
$table->string('user_id'); | ||
$table->string('old'); | ||
$table->string('new'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
Schema::dropIfExists('user_username_changer_log'); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,4 +44,5 @@ | |
<small>头像缓存时间/秒,减少查询,大幅度优化速度 默认10分钟</small> | ||
</div> | ||
|
||
|
||
</div> |
File renamed without changes.