60 lines
1.4 KiB
PHP
60 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace common\modelsgii;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "yii_drugstore_drug".
|
|
*
|
|
* @property int $id
|
|
* @property int $drugstore_id 药房id
|
|
* @property int $drug_id 药id
|
|
* @property int $type 类型 1中药2西药3颗粒配方
|
|
* @property float $price 价格
|
|
* @property int $stock 库存
|
|
* @property int $frozen_number 冻结数量
|
|
* @property int $created_at
|
|
* @property int $updated_at
|
|
*/
|
|
class DrugStoreDrug extends \common\core\BaseActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'yii_drugstore_drug';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['drugstore_id', 'drug_id', 'type', 'price', 'stock'], 'required'],
|
|
[['drugstore_id', 'drug_id', 'type', 'stock', 'frozen_number', 'created_at', 'updated_at'], 'integer'],
|
|
[['price'], 'number'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'drugstore_id' => 'Drugstore ID',
|
|
'drug_id' => 'Drug ID',
|
|
'type' => 'Type',
|
|
'price' => 'Price',
|
|
'stock' => 'Stock',
|
|
'frozen_number' => 'Frozen Number',
|
|
'created_at' => 'Created At',
|
|
'updated_at' => 'Updated At',
|
|
];
|
|
}
|
|
}
|