| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Builder;
- use Illuminate\Foundation\Auth\User as Authenticatable;
- use Illuminate\Notifications\Notifiable;
- use Laravel\Sanctum\HasApiTokens;
- /**
- * Admin
- * @mixin Builder
- * @method static Builder|static where($column, $operator = null, $value = null, $boolean = 'and')
- * @method static Builder|static create($data)
- * @property $id
- * @property $member_id
- * @property $channel
- * @property $bank_name
- * @property $account
- * @property $card_no
- * @property $alias
- *
- */
- class Bank extends Authenticatable
- {
- use HasApiTokens, Notifiable;
- protected $table = 'banks';
- protected $hidden = ['created_at', 'updated_at'];
- protected $fillable = ['member_id', 'channel', 'bank_name', 'account', 'card_no', 'alias'];
- public function getId()
- {
- return $this->id;
- }
- public function setMemberId($memberId): void
- {
- $this->member_id = $memberId;
- }
- public function getMemberId(): int
- {
- return $this->member_id;
- }
- public function getChannel(): string
- {
- return $this->channel;
- }
- public function getBankName(): string
- {
- return $this->bank_name;
- }
- public function getAccount(): string
- {
- return $this->account;
- }
- public function getAlias(): string
- {
- return $this->alias;
- }
- public function getCardNo(): string
- {
- return $this->card_no;
- }
- protected function getCreatedAtAttribute($value)
- {
- return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
- }
- protected function getUpdatedAtAttribute($value)
- {
- return \Carbon\Carbon::parse($value)->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
- }
- }
|