Your IP : 216.73.216.79


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

<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "purchase_item".
 *
 * @property int $id
 * @property int $purchase_id
 * @property string $product_name
 * @property int $quantity
 * @property string $uom
 * @property string $unit_price
 * @property string $total_price
 * @property string $created_dt
 * @property int $created_by
 * @property string $updated_dt
 * @property int $updated_by
 */
class PurchaseItem extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'purchase_item';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['purchase_id', 'quantity', 'created_by', 'updated_by'], 'integer'],
            [['created_dt', 'updated_dt','discount'], 'safe'],
            [['product_name', 'uom'], 'string', 'max' => 255],
            [['unit_price', 'total_price'], 'string', 'max' => 20],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'purchase_id' => 'Purchase ID',
            'product_name' => 'Product Name',
            'quantity' => 'Quantity',
            'uom' => 'Uom',
            'unit_price' => 'Unit Price',
            'total_price' => 'Total Price',
            'created_dt' => 'Created Dt',
            'created_by' => 'Created By',
            'updated_dt' => 'Updated Dt',
            'updated_by' => 'Updated By',
        ];
    }
}