| Current Path : /var/www/html/crm/models/ |
| Current File : /var/www/html/crm/models/Receipt.php |
<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "receipt".
*
* @property int $id
* @property string $uuid
* @property string $type
* @property string $remarks
* @property string $amount
* @property string $receipt_dt
* @property string $attachment
* @property string $created_dt
* @property int $created_by
* @property string $updated_dt
* @property int $updated_by
*/
class Receipt extends \yii\db\ActiveRecord {
/**
* {@inheritdoc}
*/
public static function tableName() {
return 'receipt';
}
/**
* {@inheritdoc}
*/
public function rules() {
return [
[['remarks', 'type', 'amount', 'receipt_dt'], 'required'],
[['receipt_dt', 'created_dt', 'updated_dt', 'uuid', 'remarks'], 'safe'],
[['created_by', 'updated_by'], 'integer'],
[['amount'], 'number'],
[['type', 'amount', 'attachment'], 'string', 'max' => 255],
[['attachment'], 'file'],
[['attachment'], 'required', 'on' => 'create'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels() {
return [
'id' => 'ID',
'uuid' => 'Uuid',
'type' => 'Type',
'remarks' => 'Remarks',
'amount' => 'Amount',
'receipt_dt' => 'Receipt Date',
'attachment' => 'Upload Receipt',
'created_dt' => 'Created Dt',
'created_by' => 'Created By',
'updated_dt' => 'Updated Dt',
'updated_by' => 'Updated By',
];
}
}