mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-04 22:44:53 +01:00
41 lines
739 B
PHP
41 lines
739 B
PHP
<?php
|
|
|
|
namespace yiiunit\data\ar;
|
|
|
|
/**
|
|
* Class Customer.
|
|
*
|
|
* @property int $id
|
|
* @property string $name
|
|
* @property string $email
|
|
* @property string $address
|
|
* @property int $status
|
|
*
|
|
* @method CustomerQuery findBySql($sql, $params = []) static
|
|
*/
|
|
class CustomerWithAlias extends ActiveRecord
|
|
{
|
|
const STATUS_ACTIVE = 1;
|
|
const STATUS_INACTIVE = 2;
|
|
|
|
public $status2;
|
|
|
|
public $sumTotal;
|
|
|
|
public static function tableName()
|
|
{
|
|
return 'customer';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
* @return CustomerQuery
|
|
*/
|
|
public static function find()
|
|
{
|
|
$activeQuery = new CustomerQuery(get_called_class());
|
|
$activeQuery->alias('csr');
|
|
return $activeQuery;
|
|
}
|
|
}
|