<?php
class Cards extends \Phalcon\Mvc\Model
{
/**
*
* @var integer
* @Primary
* @Identity
* @Column(type="integer", length=50, nullable=false)
*/
public $id;
/**
*
* @var string
* @Column(type="string", length=50, nullable=false)
*/
public $password;
/**
*
* @var string
* @Column(type="string", nullable=false)
*/
public $import_date;
/**
*
* @var string
* @Column(type="string", length=10, nullable=false)
*/
public $card_status;
/**
*
* @var integer
* @Column(type="integer", length=10, nullable=false)
*/
public $import_user;
/**
*
* @var integer
* @Column(type="integer", length=10, nullable=false)
*/
public $operate_staff;
/**
*
* @var string
* @Column(type="string", nullable=false)
*/
public $operate_date;
/**
* Initialize method for model.
*/
public function initialize()
{
$this->setSchema("card_system");
$this->belongsTo('import_user', '\Admin', 'id', ['alias' => 'Admin']);
$this->belongsTo('operate_staff', '\Users', 'id', ['alias' => 'Users']);
}
/**
* Returns table name mapped in the model.
*
* @return string
*/
public function getSource()
{
return 'cards';
}
/**
* Allows to query a set of records that match the specified conditions
*
* @param mixed $parameters
* @return Cards[]|Cards|\Phalcon\Mvc\Model\ResultSetInterface
*/
public static function find($parameters = null)
{
return parent::find($parameters);
}
/**
* Allows to query the first record that match the specified conditions
*
* @param mixed $parameters
* @return Cards|\Phalcon\Mvc\Model\ResultInterface
*/
public static function findFirst($parameters = null)
{
return parent::findFirst($parameters);
}
}