CashierGoodsPriceLog.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. use yii\db\ActiveRecord;
  11. /**
  12. * This is the model class for table "{{%cashier_goods_price_log}}".
  13. *
  14. * @property integer $id
  15. * @property integer $goods_id
  16. * @property integer $user_id
  17. * @property integer $md_id
  18. * @property string $attr
  19. * @property float $price
  20. * @property string $created_at
  21. */
  22. class CashierGoodsPriceLog extends \yii\db\ActiveRecord
  23. {
  24. /**
  25. * @inheritdoc
  26. */
  27. public static function tableName()
  28. {
  29. return '{{%cashier_goods_price_log}}';
  30. }
  31. public function behaviors()
  32. {
  33. return [
  34. [
  35. 'class' => TimestampBehavior::class,
  36. 'attributes' => [
  37. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at']
  38. ]
  39. ]
  40. ];
  41. }
  42. /**
  43. * @inheritdoc
  44. */
  45. public function rules()
  46. {
  47. return [
  48. [['id', 'goods_id', 'user_id', 'md_id'], 'integer'],
  49. [['created_at', 'attr'], 'string'],
  50. [['price'], 'number'],
  51. [['created_at'], 'safe']
  52. ];
  53. }
  54. }