| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- class Anagrafica extends Model
- {
- use HasFactory;
- public $timestamps = false;
- protected $table = 'fcf_reports_anagraficas';
- protected $fillable = [
- 'type',
- 'firstname',
- 'lastname',
- 'gender',
- 'birth_date',
- 'birth_town_id',
- 'birth_prov_id',
- 'residenza_town_id',
- 'residenza_prov_id',
- 'residenza_address',
- 'residenza_cap',
- 'mobile',
- 'sedicente',
- 'documento_tipo',
- 'documento_patente_cat',
- 'documento_tipo_altro',
- 'documento_numero',
- 'documento_rilasciato_da',
- 'documento_rilasciato_da_altro',
- 'foreign_country',
- 'documento_rilasciato_da_di_foreign_localita',
- 'documento_rilasciato_da_di_foreign_country',
- 'documento_rilasciato_da_prov_id',
- 'documento_rilasciato_da_town_id',
- 'documento_rilasciato_il',
- 'documento_scadenza_il',
- 'state',
- 'created' ,
- 'created_by',
- 'updated' ,
- 'updated_by',
- 'locked' ,
- 'locked_by',
- 'nazionalita',
- 'nazione_straniera',
- 'localita_straniera',
- 'rag_soc',
- 'vat',
- 'sede_legale_address',
- 'sede_legale_town_id',
- 'sede_legale_prov_id',
- 'sede_legale_cap',
- 'sede_legale_state',
- 'phone',
- 'anag_foreign_birth_country',
- 'anag_foreign_birth_city',
- 'anag_foreign_residence_country',
- 'anag_foreign_residence_city',
- 'residenza_tipo'
- ];
- public function birth_town_id_value()
- {
- return $this->belongsTo(\App\Models\LocationTown::class, 'birth_town_id');
- }
- public function residenza_town_id_value()
- {
- return $this->belongsTo(\App\Models\LocationTown::class, 'residenza_town_id');
- }
- public function documento_rilasciato_da_town_id_value()
- {
- return $this->belongsTo(\App\Models\LocationTown::class, 'documento_rilasciato_da_town_id');
- }
- public function documento_rilasciato_da_di_foreign_country_value()
- {
- return $this->belongsTo(\App\Models\LocationCountry::class, 'documento_rilasciato_da_di_foreign_country');
- }
- public function foreign_birth_country_value()
- {
- return $this->belongsTo(\App\Models\LocationCountry::class, 'anag_foreign_birth_country');
- }
- public function foreign_residence_country_value()
- {
- return $this->belongsTo(\App\Models\LocationCountry::class, 'anag_foreign_residence_country');
- }
- public function sede_legale_town_id_value()
- {
- return $this->belongsTo(\App\Models\LocationTown::class, 'sede_legale_town_id');
- }
- public function sede_legale_prov_id_value()
- {
- return $this->belongsTo(\App\Models\LocationProvince::class, 'sede_legale_prov_id');
- }
- public function residenza_prov_id_value()
- {
- return $this->belongsTo(\App\Models\LocationProvince::class, 'residenza_prov_id');
- }
- public function get($key)
- {
- return $this->getAttribute($key);
- }
- }
|