GivingGiftsGoods.php 790 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2025 赤店商城 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. use yii\db\ActiveRecord;
  11. class GivingGiftsGoods extends \yii\db\ActiveRecord
  12. {
  13. /**
  14. * @inheritdoc
  15. */
  16. public static function tableName()
  17. {
  18. return '{{%giving_gifts_goods}}';
  19. }
  20. public function behaviors()
  21. {
  22. return [
  23. [
  24. // 自动更新创建和更新时间
  25. 'class' => TimestampBehavior::class,
  26. 'attributes' => [
  27. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  28. ]
  29. ]
  30. ];
  31. }
  32. }