Your IP : 216.73.216.79


Current Path : /var/www/html/crm/models/
Upload File :
Current File : /var/www/html/crm/models/Debitnote.php

<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "debitnote".
 *
 * @property int $id
 * @property string $uuid
 * @property string $doc_no
 * @property string $doc_dt
 * @property string $ref
 * @property int $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 $notes
 * @property string $created_dt
 * @property int $created_by
 * @property string $updated_dt
 * @property int $updated_by
 */
class Debitnote extends \yii\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return 'debitnote';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['uuid', 'doc_dt', 'company_id', 'customer_name', 'customer_address1', 'customer_postcode', 'customer_city', 'customer_state', 'customer_pic', 'customer_phone', 'type'], 'required'],
            [['doc_dt', 'created_dt', 'updated_dt', 'grandtotal'], 'safe'],
            [['company_id', 'customer_id', 'created_by', 'updated_by'], 'integer'],
            [['notes'], 'string'],
            [['doc_no', 'ref', 'customer_name', 'customer_address1', 'customer_address2', 'customer_city', 'customer_pic'], 'string', 'max' => 255],
            [['customer_postcode'], 'string', 'max' => 10],
            [['customer_state', 'customer_phone'], 'string', 'max' => 20],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'uuid' => 'Uuid',
            'doc_no' => 'Debit Note No.',
            'doc_dt' => 'Document Date',
            'ref' => 'Ref',
            'company_id' => 'Company',
            'customer_id' => 'Customer',
            'customer_name' => 'Customer Name',
            'customer_address1' => 'Address',
            'customer_address2' => 'Customer Address2',
            'customer_postcode' => 'Postcode',
            'customer_city' => 'City',
            'customer_state' => 'State',
            'customer_pic' => 'Contact Person',
            'customer_phone' => 'Contact No.',
            'notes' => 'Note / Reason',
            'created_dt' => 'Created Dt',
            'created_by' => 'Created By',
            'updated_dt' => 'Updated Dt',
            'updated_by' => 'Updated By',
            'type' => 'Note Type'
        ];
    }

}