PospalCat.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. class PospalCat extends ActiveRecord
  11. {
  12. public static function tableName()
  13. {
  14. return '{{%pospal_cat}}';
  15. }
  16. public function behaviors()
  17. {
  18. return [
  19. [
  20. // 自动更新创建和更新时间
  21. 'class' => TimestampBehavior::class,
  22. 'value' => null
  23. ]
  24. ];
  25. }
  26. public function rules()
  27. {
  28. return [
  29. [['id', 'store_id', 'cat_id'], 'integer'],
  30. [['create_at', 'update_at', 'is_delete', 'uid', 'parentUid', 'name'], 'safe'],
  31. ];
  32. }
  33. public function attributeLabels()
  34. {
  35. return [
  36. 'id' => 'ID',
  37. 'store_id' => 'store_id',
  38. 'uid' => 'uid',
  39. 'parentUid' => 'parentUid',
  40. 'name' => 'name',
  41. 'cat_id' => 'cat_id',
  42. 'is_delete' => '删除',
  43. 'create_at' => '创建时间',
  44. 'update_at' => '更新时间',
  45. ];
  46. }
  47. }