Files
xk-api-yii/common/modelsgii/oldDb/ProcessRule.php

61 lines
1.2 KiB
PHP

<?php
/*
* @author: liudiao1992
* @Date: 2023-09-18 15:23:55
* @Description: 重要加工规则表
*/
namespace common\modelsgii\oldDb;
/**
* This is the model class for table "yii2_process_rule".
*
* @property int $id
* @property int $pid
* @property string|null $name
* @property int $calc_method
* @property float $price
* @property float $unit
* @property int|null $created_at 创建时间
*/
class ProcessRule extends \common\core\BaseActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return '{{%process_rule}}';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['created_at','pid'], 'integer'],
[['name','unit'], 'string', 'max' => 50],
[['name'], 'unique'],
[['calc_method'],'in','range' => [1,2,3]],
['price','double'],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'pid' => 'Pid',
'name' => 'Name',
'calc_method' => 'calc_method',
'price' => 'price',
'unit' => 'unit',
'created_at' => '创建时间',
];
}
}