| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- namespace app\model\blue;
- use app\extra\basic\Model;
- use think\model\relation\HasOne;
- /**
- * @property integer $id (主键)
- * @property mixed $openid
- * @property integer $bank_id
- * @property integer $money
- * @property integer $status 0审核1到账2失败
- * @property string $remark
- * @property mixed $create_at 创建时间
- */
- class BlueWithdrawLog extends Model
- {
- /**
- * The connection name for the model.
- *
- * @var string|null
- */
- protected $connection = 'mysql';
-
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected string $table = "blue_withdraw_log";
-
- /**
- * The primary key associated with the table.
- *
- * @var string
- */
- protected string $primaryKey = "id";
-
- /**
- * Indicates if the model should be timestamped.
- *
- * @var bool
- */
- public bool $timestamps = false;
- public function getMoneyAttr($value): string
- {
- return $value == 0 ? "0.00" : format_money($value/100);
- }
- public function bank(): HasOne
- {
- return $this->hasOne(BlueUserBank::class,"id","bank_id");
- }
- }
|