项目初始化

This commit is contained in:
2026-03-18 15:54:43 +08:00
commit dfcd762e23
601 changed files with 57883 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
<?php
use Phinx\Migration\AbstractMigration;
/**
* 积分商城用户表 mall_player
*/
class MallPlayer extends AbstractMigration
{
public function change(): void
{
if (!$this->hasTable('mall_player')) {
$table = $this->table('mall_player', [
'id' => false,
'comment' => '积分商城用户表',
'row_format' => 'DYNAMIC',
'primary_key' => 'id',
'collation' => 'utf8mb4_unicode_ci',
]);
$table->addColumn('id', 'integer', ['comment' => 'ID', 'signed' => false, 'identity' => true, 'null' => false])
->addColumn('username', 'string', ['limit' => 50, 'default' => '', 'comment' => '用户名', 'null' => false])
->addColumn('password', 'string', ['limit' => 255, 'default' => '', 'comment' => '密码', 'null' => false])
->addColumn('score', 'integer', ['signed' => false, 'default' => 0, 'comment' => '积分', 'null' => false])
->addColumn('create_time', 'biginteger', ['signed' => false, 'null' => true, 'default' => null, 'comment' => '创建时间'])
->addColumn('update_time', 'biginteger', ['signed' => false, 'null' => true, 'default' => null, 'comment' => '修改时间'])
->addIndex(['username'])
->create();
}
}
}