| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * This is the model class for table "{{%warehouse_zone}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property string $name
- * @property integer $sort
- * @property integer $warehouse_id
- * @property integer $is_delete
- */
- class WarehouseZone extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%warehouse_zone}}';
- }
- public function rules()
- {
- return [
- [['id', 'sort', 'is_delete', 'store_id', 'warehouse_id'], 'integer'],
- [['name'], 'string'],
- [['created_at', 'updated_at'], 'safe']
- ];
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
- ]
- ]
- ];
- }
- }
|