Mike 7 anos atrás
pai
commit
9bd3f62db3

+ 2 - 0
server/app/Models/AccountLog.php

xqd xqd
@@ -21,6 +21,7 @@ class AccountLog extends Model
     const OP_CHARGE         = 'CHARGE';
     const OP_SUPPORT        = 'SUPPORT';
     const OP_WITHDRAW       = 'WITHDRAW';
+    const OP_DREAM          = 'DREAM';
 
     //货币类型定义
     const TYPE_BALANCE      = 1;
@@ -41,6 +42,7 @@ class AccountLog extends Model
         self::OP_CHARGE         => '充值',
         self::OP_SUPPORT        => '支持梦想',
         self::OP_WITHDRAW       => '提现',
+        self::OP_DREAM          => '梦想结束',
     ];
 
     //货币类型枚举

+ 6 - 2
server/database/migrations/2017_04_02_113151_create_account_logs_table.php

xqd
@@ -22,15 +22,19 @@ class CreateAccountLogsTable extends Migration
             $table->string('from_type', 20)->comment('操作类型,1、余额,2、梦想币,3、现金');
             $table->unsignedInteger('from_id')->comment('来源对象id');
             $table->string('from_name', 100)->nullable()->comment('来源对象名称');
-            $table->string('op', 20)->comment('操作,charge:冲值,support:消耗,withdraw:提现');
+            $table->string('op', 20)->comment('操作,charge:冲值,support:消耗,withdraw:提现,dream:梦想结束');
             $table->unsignedInteger('from_amount')->comment('操作金额from');
             $table->string('to_type', 20)->comment('操作类型,1、余额,2、梦想币,3、现金');
             $table->unsignedInteger('to_id')->comment('目标对象id');
             $table->string('to_name', 100)->nullable()->comment('来源目标对象名称');
             $table->unsignedInteger('to_amount')->comment('操作金额to');
             $table->string('channel', 50)->nullable()->comment('交易渠道,支付宝/微信/平台内等');
+            $table->string('avatar', 255)->nullable()->comment('头像');
+            $table->string('transaction_id', 255)->nullable()->comment('交易流水号');
             $table->string('note', 255)->nullable()->comment('备注');
-            $table->nullableTimestamps();
+
+            $table->timestamps();
+            $table->softDeletes();
 
             $table->index(['from_id'], 'idx_from');
             $table->index(['to_id'], 'idx_to');