QAndAAdLog.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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_log}}".
  12. *
  13. * @property int $id
  14. * @property int $store_id
  15. * @property int $user_id
  16. * @property int $created_at
  17. * @property int $integral
  18. */
  19. class QAndAAdLog extends \yii\db\ActiveRecord
  20. {
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public static function tableName()
  25. {
  26. return '{{%q_and_a_ad_log}}';
  27. }
  28. public function behaviors()
  29. {
  30. return [
  31. [
  32. 'class' => TimestampBehavior::class,
  33. 'attributes' => [
  34. ActiveRecord::EVENT_BEFORE_INSERT => 'created_at',
  35. ]
  36. ]
  37. ];
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function rules()
  43. {
  44. return [
  45. [['store_id', 'user_id', 'integral'], 'required'],
  46. [['created_at',], 'safe']
  47. ];
  48. }
  49. /**
  50. * {@inheritdoc}
  51. */
  52. public function attributeLabels()
  53. {
  54. return [
  55. 'id' => 'ID',
  56. 'store_id' => 'Store ID',
  57. 'user_id' => '用户id',
  58. 'created_at' => '添加时间',
  59. 'integral' => '积分',
  60. ];
  61. }
  62. }