链街Dcat后台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
808 B

  1. <?php
  2. namespace App\Models;
  3. use Dcat\Admin\Traits\HasDateTimeFormatter;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. use Illuminate\Database\Eloquent\Model;
  6. class LanzuCsWithdraw extends Model
  7. {
  8. use HasDateTimeFormatter;
  9. use SoftDeletes;
  10. protected $table = 'lanzu_cs_withdraw';
  11. protected $dateFormat = 'U';
  12. public function csInfo()
  13. {
  14. return $this->belongsTo("\App\Models\LanzuCsInfo",'cs_id','id');
  15. }
  16. public function getCreatedAtAttribute($value)
  17. {
  18. return date('Y-m-d H:i',$value);
  19. }
  20. public function getUpdatedAtAttribute($value)
  21. {
  22. return date('Y-m-d H:i',$value);
  23. }
  24. //变更提现状态
  25. public static function updateStatus($id,$status)
  26. {
  27. return self::where('id',$id)->update(['status'=>$status]);
  28. }
  29. }