PtActivityOrderDetail.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\behaviors\TimestampBehavior;
  9. use yii\db\ActiveRecord;
  10. /**
  11. * This is the model class for table "{{%pt_activity_order_detail}}".
  12. *
  13. * @property integer $id
  14. * @property integer $order_id
  15. * @property integer $goods_id
  16. * @property string $goods_name
  17. * @property integer $num
  18. * @property float $total_price
  19. * @property integer $created_at
  20. * @property integer $is_delete
  21. * @property string $attr
  22. * @property string $pic
  23. * @property string $goods_info
  24. * @property integer $delivery_type
  25. * @property string $integral
  26. * @property integer $is_level
  27. * @property float $profit
  28. * @property integer $activity_id
  29. */
  30. class PtActivityOrderDetail extends \yii\db\ActiveRecord
  31. {
  32. /**
  33. * @inheritdoc
  34. */
  35. public static function tableName()
  36. {
  37. return '{{%pt_activity_order_detail}}';
  38. }
  39. public function behaviors()
  40. {
  41. return [
  42. [
  43. 'class' => TimestampBehavior::class,
  44. 'attributes' => [
  45. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at']
  46. ]
  47. ]
  48. ];
  49. }
  50. /**
  51. * @inheritdoc
  52. */
  53. public function rules()
  54. {
  55. return [
  56. [["id", "order_id", "goods_id", "num", "created_at", "is_delete", "delivery_type", "is_level", "activity_id"], 'integer'],
  57. [["total_price", "profit", 'integral', 'integral_price'], 'number'],
  58. [["goods_name", "attr", "pic", "goods_info"], 'string']
  59. ];
  60. }
  61. /**
  62. * @inheritdoc
  63. */
  64. public function attributeLabels()
  65. {
  66. return [
  67. "id" => "",
  68. "order_id" => "",
  69. "goods_id" => "",
  70. "goods_name" => "商品名称",
  71. "num" => "商品数量",
  72. "total_price" => "此商品的总价",
  73. "created_at" => "",
  74. "is_delete" => "",
  75. "attr" => "商品规格",
  76. "pic" => "商品规格图片",
  77. "goods_info" => "商品快照",
  78. "delivery_type" => "0:快递,1:自提, 2:同城配送",
  79. "is_level" => "是否是会员支付",
  80. "profit" => "分红",
  81. "activity_id" => "活动ID"
  82. ];
  83. }
  84. }