<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * @property integer id
 * @property string name
 * @property string created_at
 * @property string updated_at
 * @property string deleted_at
 *
 * @SWG\Definition(
 *      definition="Oldcustomer",
 *      required={"id", "lead_id", "name", "email", "number", "primary_column"},
 *      @SWG\Property(
 *          property="id",
 *          description="id",
 *          type="integer",
 *          format="int32"
 *      ),
 *      @SWG\Property(
 *          property="lead_id",
 *          description="lead_id",
 *          type="integer",
 *          format="int32"
 *      ),
 *      @SWG\Property(
 *          property="name",
 *          description="name",
 *          type="string"
 *      ),
 *      @SWG\Property(
 *          property="email",
 *          description="email",
 *          type="string"
 *      ),
 *      @SWG\Property(
 *          property="number",
 *          description="number",
 *          type="string"
 *      ),
 *      @SWG\Property(
 *          property="primary_column",
 *          description="primary_column",
 *          type="integer",
 *          format="int32"
 *      )
 * )
 */
class Oldcustomer extends Model
{
    use SoftDeletes;

    public $table = 'me_customer';
    

    protected $dates = ['deleted_at'];


    public $fillable = [
        'id',
        'lead_id',
        'name',
        'email',
        'number',
        'primary_column'
    ];

    /**
     * The attributes that should be casted to native types.
     *
     * @var array
     */
    protected $casts = [
        'id' => 'integer',
        'lead_id' => 'integer',
        'name' => 'string',
        'email' => 'string',
        'number' => 'string',
        'primary_column' => 'integer'
    ];

    /**
     * The objects that should be append to toArray.
     *
     * @var array
     */
     protected $with = [];

    /**
     * The attributes that should be append to toArray.
     *
     * @var array
     */
    protected $appends = [];

    /**
     * The attributes that should be visible in toArray.
     *
     * @var array
     */
    protected $visible = [];

    /**
     * Validation create rules
     *
     * @var array
     */
    public static $rules = [
        'id' => 'required',
        'lead_id' => 'required',
        'name' => 'required',
        'email' => 'required',
        'number' => 'required',
        'primary_column' => 'required'
    ];

    /**
     * Validation update rules
     *
     * @var array
     */
    public static $update_rules = [
        'id' => 'required',
        'lead_id' => 'required',
        'name' => 'required',
        'email' => 'required',
        'number' => 'required',
        'primary_column' => 'required'
    ];

    /**
     * Validation api rules
     *
     * @var array
     */
    public static $api_rules = [
        'id' => 'required',
        'lead_id' => 'required',
        'name' => 'required',
        'email' => 'required',
        'number' => 'required',
        'primary_column' => 'required'
    ];
	
	/**
     * Validation api update rules
     *
     * @var array
     */
    public static $api_update_rules = [
        'id' => 'required',
        'lead_id' => 'required',
        'name' => 'required',
        'email' => 'required',
        'number' => 'required',
        'primary_column' => 'required'
    ];

    
}
