| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsToMany;
- use Illuminate\Database\Eloquent\SoftDeletes;
- /**
- * @property int $id
- * @property string $name
- * @property string|null $cpf
- * @property string|null $rg
- * @property string|null $cnpj
- * @property string|null $phone
- * @property string|null $cellphone_number
- * @property string $street
- * @property string|null $address_number
- * @property string $neighborhood
- * @property string $postal_code
- * @property int $city_id
- * @property int $state_id
- * @property string $birth_date
- * @property \Carbon\Carbon $created_at
- * @property \Carbon\Carbon $updated_at
- * @property \Carbon\Carbon|null $deleted_at
- */
- class Franchisee extends Model
- {
- use HasFactory, SoftDeletes;
- protected $table = 'franchisees';
- protected $guarded = ['id'];
- protected $casts = [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- 'deleted_at' => 'datetime',
- ];
- public function units(): BelongsToMany
- {
- return $this->belongsToMany(Unit::class, 'franchisee_units');
- }
- }
|