12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace App\Models\Partner;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\SoftDeletes;
- class PartnerBeauty extends Model
- {
- use SoftDeletes;
- protected $table = "partner_beauties";
- protected $dateFormat = "U";
- protected $fillable = [
- 'partner_id',
- 'uid',
- 'sex',
- 'field',
- 'original_photo',
- 'new_photo',
- 'is_beauty',
- 'submitted_at'
- ];
- protected $appends = [
- 'is_submit'
- ];
- protected $casts = [
- 'is_submit' => 'boolean',
- 'is_beauty' => 'boolean',
- ];
- public function getIsSummitAttribute()
- {
- return $this->submitted_at ? true : false;
- }
- }
|