TerritorialLimitation.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. /**
  11. * This is the model class for table "{{%territorial_limitation}}".
  12. *
  13. * @property integer $id
  14. * @property integer $store_id
  15. * @property string $detail
  16. * @property integer $addtime
  17. * @property integer $is_enable
  18. * @property integer $is_delete
  19. */
  20. class TerritorialLimitation extends \yii\db\ActiveRecord
  21. {
  22. /**
  23. * @inheritdoc
  24. */
  25. public static function tableName()
  26. {
  27. return '{{%territorial_limitation}}';
  28. }
  29. public function behaviors()
  30. {
  31. return [
  32. [
  33. // 自动更新创建和更新时间
  34. 'class' => TimestampBehavior::class,
  35. 'value' => time()
  36. ]
  37. ];
  38. }
  39. /**
  40. * @inheritdoc
  41. */
  42. public function rules()
  43. {
  44. return [
  45. [['store_id', 'detail'], 'required'],
  46. [['store_id', 'created_at', 'updated_at', 'is_enable', 'is_delete'], 'integer'],
  47. [['detail'], 'string'],
  48. ];
  49. }
  50. /**
  51. * @inheritdoc
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. 'id' => 'ID',
  57. 'store_id' => 'Store ID',
  58. 'detail' => 'Detail',
  59. 'created_at' => '创建时间',
  60. 'is_enable' => 'Is Enable',
  61. 'is_delete' => 'Is Delete',
  62. 'updated_at' => '更新时间'
  63. ];
  64. }
  65. }