| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace App\Models;
- use App\Constants\Util;
- class Recharge extends BaseModel
- {
- protected $table = 'recharges';
- // protected $fillable = ['member_id', 'confirmations', 'coin', 'txid','block_time','block_height' ,'net' ,'coin' ,'amount' ,'to_address' ,'from_address' ,'status'];
- const STATUS_STAY = 0;
- const STATUS_SUCCESS = 1;
- const STATUS_FAIL = 2;
- const STATUS_IGNORE = 3;
- public static $STATUS = [
- 0 => '待确认',
- 1 => '已确认',
- 2 => '失败',
- 3 => '已忽略',
- ];
- const TYPE_AUTO = 1; // 自动
- const TYPE_HAND = 2; // 手动
- protected function getAmountAttribute($value)
- {
- return floatval($value);
- }
- protected function getImageAttribute($value)
- {
- return Util::ensureUrl($value);
- }
- }
|