QAndAAdSetting.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. /**
  11. * This is the model class for table "{{%q_and_a_ad_setting}}".
  12. *
  13. * @property int $id
  14. * @property int $store_id
  15. * @property int $award_integral
  16. * @property int $see_num
  17. * @property string $first_commission
  18. * @property string $second_commission
  19. * @property string $third_commission
  20. * @property string $adpid
  21. * @property int $updated_at
  22. */
  23. class QAndAAdSetting extends \yii\db\ActiveRecord
  24. {
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%q_and_a_ad_setting}}';
  31. }
  32. public function behaviors()
  33. {
  34. return [
  35. [
  36. 'class' => TimestampBehavior::class,
  37. 'attributes' => [
  38. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at'],
  39. ]
  40. ]
  41. ];
  42. }
  43. /**
  44. * {@inheritdoc}
  45. */
  46. public function rules()
  47. {
  48. return [
  49. [['store_id', 'award_integral', 'see_num', 'adpid'], 'required'],
  50. [['store_id', 'first_commission', 'second_commission', 'third_commission', 'updated_at'], 'safe']
  51. ];
  52. }
  53. /**
  54. * {@inheritdoc}
  55. */
  56. public function attributeLabels()
  57. {
  58. return [
  59. 'id' => 'ID',
  60. 'store_id' => 'Store ID',
  61. 'award_integral' => '奖励积分',
  62. 'see_num' => '观看次数',
  63. 'first_commission' => '一级分销',
  64. 'second_commission' => '二级分销',
  65. 'third_commission' => '三级分销',
  66. 'adpid' => '广告位id',
  67. 'updated_at' => '是否删除',
  68. ];
  69. }
  70. }