12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace common\models;
- use Yii;
- class RedRule extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%red_rule}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['red_id', 'usecount', 'created_at', 'start_price', 'end_price','joincount'], 'required'],
- [['red_id', 'usecount', 'created_at','joincount'], 'integer'],
- [['start_price','end_price'], 'number'],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'red_id' => '红包活动id',
- 'usecount' => '红包被打开次数',
- 'created_at' => '创建时间',
- 'start_price' => '红包最小金额',
- 'end_price'=>'红包最大金额',
- 'joincount' => '可参与活动次数',
- ];
- }
- }
|