UserBank.php 626 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: qisse
  5. * Date: 2017/6/27
  6. * Time: 20:02
  7. */
  8. namespace app\core\model;
  9. use think\Model;
  10. use tool\Common;
  11. class UserBank extends Model
  12. {
  13. protected $resultSetType = 'collection';
  14. protected $updateTime = 'updateTime';
  15. protected $createTime = 'addTime';
  16. protected $autoWriteTimestamp = true;
  17. const STATUS_OK = 1;
  18. const STATUS_FAIL = 2;
  19. public function bank() {
  20. return $this->belongsTo('Bank', 'bankID');
  21. }
  22. public function getBankNumberAsteriskAttr($value, $data) {
  23. return Common::bankNumberAsterisk($data['bankNumber']);
  24. }
  25. }