| Current Path : /var/www/html/dyna-crm/models/ |
| Current File : /var/www/html/dyna-crm/models/Quotation.php |
<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "quotation".
*
* @property int $id
* @property string $uuid
* @property string $doc_no
* @property int $company_id company id
* @property int $customer_id
* @property string $customer_name
* @property string $customer_address1
* @property string $customer_address2
* @property string $customer_postcode
* @property string $customer_city
* @property string $customer_state
* @property string $customer_pic
* @property string $customer_phone
* @property string $doc_date
* @property string $valid_dt
* @property string $created_dt
* @property int $created_by
* @property string $updated_dt
* @property int $updated_by
*/
class Quotation extends \yii\db\ActiveRecord {
/**
* {@inheritdoc}
*/
public static function tableName() {
return 'quotation';
}
/**
* {@inheritdoc}
*/
public function rules() {
return [
[['uuid', 'company_id', 'customer_name', 'customer_address1', 'customer_postcode', 'customer_city', 'customer_state', 'customer_pic', 'customer_phone',
'doc_date', 'valid_dt'], 'required'],
[['company_id', 'customer_id', 'created_by', 'updated_by'], 'integer'],
[['doc_date', 'valid_dt', 'created_dt', 'updated_dt', 'waranty_start', 'waranty_end',
'approved_by', 'tax_status', 'tax_name', 'tax_percentage'], 'safe'],
[['doc_no', 'customer_name', 'customer_address1', 'customer_address2', 'customer_city', 'customer_pic'], 'string', 'max' => 255],
[['customer_postcode'], 'string', 'max' => 5],
[['customer_state', 'customer_phone'], 'string', 'max' => 20],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels() {
return [
'id' => 'ID',
'uuid' => 'Uuid',
'doc_no' => 'Quotation No.',
'company_id' => 'Company',
'customer_id' => 'Customer',
'customer_name' => 'Customer Name',
'customer_address1' => 'Customer Address',
'customer_address2' => 'Customer Address2',
'customer_postcode' => 'Postcode',
'customer_city' => 'City',
'customer_state' => 'State',
'customer_pic' => 'Contact Person',
'customer_phone' => 'Contact Number',
'doc_date' => 'Quotation Date',
'valid_dt' => 'Valid Until',
'created_dt' => 'Created Dt',
'created_by' => 'Created By',
'updated_dt' => 'Updated Dt',
'updated_by' => 'Updated By',
'waranty_start' => 'Waranty Period',
'waranty_end' => 'Waranty Period',
'approved_by' => 'Approved By',
'tax_status' => 'Tax Status',
'tax_name' => 'Tax Name',
'tax_percentage' => 'Tax Percentage',
];
}
}