<?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;
    }
}
