FoodFlag.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. use yii\behaviors\TimestampBehavior;
  10. use Yii;
  11. /**
  12. * This is the model class for table "{{%food_flag}}".
  13. *
  14. * @property integer $id
  15. * @property integer $store_id
  16. * @property integer $md_id
  17. * @property integer $status
  18. * @property string $table_num
  19. * @property integer $type
  20. * @property integer $order_id
  21. * @property integer $user_id
  22. * @property integer $created_at
  23. * @property integer $updated_at
  24. */
  25. class FoodFlag extends \yii\db\ActiveRecord
  26. {
  27. /**
  28. * @inheritdoc
  29. */
  30. public static function tableName()
  31. {
  32. return '{{%food_flag}}';
  33. }
  34. public function behaviors()
  35. {
  36. return [
  37. [
  38. 'class' => TimestampBehavior::class,
  39. 'attributes' => [
  40. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  41. ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
  42. ]
  43. ]
  44. ];
  45. }
  46. /**
  47. * @inheritdoc
  48. */
  49. public function rules()
  50. {
  51. return [
  52. [['md_id', 'store_id', 'type', 'order_id', 'user_id', 'status'], 'integer'],
  53. [['created_at', 'updated_at', 'table_num'], 'safe']
  54. ];
  55. }
  56. }