| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- namespace app\plugins\food\models;
- use yii\behaviors\TimestampBehavior;
- use yii\db\ActiveRecord;
- /**
- * This is the model class for table "{{%food_table_number}}".
- *
- * @property integer $id
- * @property string $num
- * @property string $remark
- * @property string $md_id
- * @property integer $store_id
- * @property integer $is_delete
- * @property integer $created_at
- * @property integer $updated_at
- */
- class FoodTableNumber extends ActiveRecord
- {
- /**
- * 删除状态:已删除
- */
- const DELETE_STATUS_TRUE = 1;
- /**
- * 删除状态:未删除
- */
- const DELETE_STATUS_FALSE = 0;
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%food_table_number}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['store_id', 'is_delete', 'md_id'], 'integer'],
- [['num', 'remark'], 'string', 'max' => 255],
- ];
- }
- public function behaviors()
- {
- return [
- [
- 'class' => TimestampBehavior::class,
- 'attributes' => [
- ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
- ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
- ]
- ]
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'num' => '桌号',
- 'store_id' => 'store id',
- 'is_delete' => '是否删除',
- 'created_at' => '创建时间',
- 'updated_at' => '更新时间',
- 'remark' => '备注',
- ];
- }
- }
|