ShareHolderProfitGoodsLog.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. use Yii;
  11. /**
  12. * This is the model class for table "{{%share_holder_profit_goods_log}}".
  13. *
  14. * @property integer $id
  15. * @property integer $user_id
  16. * @property integer $goods_id
  17. * @property integer $order_id
  18. * @property integer $is_switch
  19. * @property float $goods_price
  20. * @property float $goods_profit
  21. * @property integer $created_at
  22. * @property integer $updated_at
  23. */
  24. class ShareHolderProfitGoodsLog extends \yii\db\ActiveRecord
  25. {
  26. /**
  27. * @inheritdoc
  28. */
  29. public static function tableName()
  30. {
  31. return '{{%share_holder_profit_goods_log}}';
  32. }
  33. public function behaviors()
  34. {
  35. return [
  36. [
  37. 'class' => TimestampBehavior::class,
  38. 'attributes' => [
  39. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at']
  40. ]
  41. ]
  42. ];
  43. }
  44. /**
  45. * @inheritdoc
  46. */
  47. public function rules()
  48. {
  49. return [
  50. [['id', 'user_id', 'goods_id', 'order_id', 'created_at', 'updated_at', 'is_switch'], 'integer'],
  51. [['goods_price', 'goods_profit'], 'number']
  52. ];
  53. }
  54. }