<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * @property integer $id_deuda_socio
 * @property integer $id_deuda_cab
 * @property int $id_socio
 * @property string $estado
 * @property string $created_at
 * @property string $updated_at
 * @property CtDeudaCab $ctDeudaCab
 * @property CoSocio $coSocio
 */
class CtDeudaSocio extends Model
{
    /**
     * The table associated with the model.
     * 
     * @var string
     */
    protected $table = 'ct_deuda_socio';

    /**
     * The primary key for the model.
     * 
     * @var string
     */
    protected $primaryKey = 'id_deuda_socio';

    /**
     * The "type" of the auto-incrementing ID.
     * 
     * @var string
     */
    protected $keyType = 'integer';

    /**
     * @var array
     */
    protected $fillable = ['id_deuda_cab', 'id_socio', 'estado', 'created_at', 'updated_at'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function ctDeudaCab()
    {
        return $this->belongsTo('App\CtDeudaCab', 'id_deuda_cab', 'id_deuda_cab');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function coSocio()
    {
        return $this->belongsTo('App\CoSocio', 'id_socio', 'IdSocios');
    }
}
