PtActivityGoodsCat.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\behaviors\TimestampBehavior;
  9. use yii\db\ActiveRecord;
  10. /**
  11. * This is the model class for table "{{%pt_activity_goods_cat}}".
  12. *
  13. * @property integer $id
  14. * @property string $name
  15. * @property integer $created_at
  16. * @property integer $updated_at
  17. * @property integer $is_delete
  18. * @property integer $store_id
  19. * @property integer $status
  20. */
  21. class PtActivityGoodsCat extends \yii\db\ActiveRecord
  22. {
  23. /**
  24. * @inheritdoc
  25. */
  26. public static function tableName()
  27. {
  28. return '{{%pt_activity_goods_cat}}';
  29. }
  30. public function behaviors()
  31. {
  32. return [
  33. [
  34. 'class' => TimestampBehavior::class,
  35. 'attributes' => [
  36. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  37. ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
  38. ]
  39. ]
  40. ];
  41. }
  42. /**
  43. * @inheritdoc
  44. */
  45. public function rules()
  46. {
  47. return [
  48. [['id', 'store_id', 'is_delete', 'status'], 'integer'],
  49. [['name'], 'string'],
  50. [['created_at', 'updated_at'], 'safe']
  51. ];
  52. }
  53. /**
  54. * @inheritdoc
  55. */
  56. public function attributeLabels()
  57. {
  58. return [
  59. 'id' => '',
  60. 'name' => '活动名称',
  61. 'created_at' => '',
  62. 'updated_at' => '',
  63. 'is_delete' => 'IS Delete',
  64. 'store_id' => 'Store ID',
  65. 'status' => '状态 0禁用 1启用',
  66. ];
  67. }
  68. }