| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('transactions', function (Blueprint $table) { |
||
| 17 | $table->bigIncrements('id'); |
||
| 18 | $table->morphs('holder'); |
||
| 19 | $table->unsignedBigInteger('wallet_id')->comment('钱包 id'); |
||
| 20 | $table->enum('type', ['deposit', 'withdraw'])->index()->comment('交易类型'); |
||
| 21 | $table->bigInteger('amount')->comment('交易数额'); |
||
| 22 | $table->boolean('confirmed')->comment('是否交易完成'); |
||
| 23 | $table->json('meta')->nullable()->comment('交易信息'); |
||
| 24 | $table->uuid('uuid')->unique()->comment('交易 uuid'); |
||
| 25 | $table->timestamps(); |
||
| 26 | }); |
||
| 39 |