SaasIntegralOrder.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\plugins\integral\models;
  8. use Yii;
  9. use yii\db\ActiveRecord;
  10. use yii\behaviors\TimestampBehavior;
  11. /**
  12. * This is the model class for table "{{%saas_integral_order}}".
  13. *
  14. * @property int $id
  15. * @property int $store_id
  16. * @property int $order_no
  17. * @property int $goods_id
  18. * @property int $integral_goods_id
  19. * @property int $cost
  20. * @property int $user_id
  21. * @property int $is_clerk
  22. * @property int $is_delete
  23. * @property int $clerk_id
  24. * @property int|null $created_at 添加时间
  25. */
  26. class SaasIntegralOrder extends \yii\db\ActiveRecord
  27. {
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public static function tableName()
  32. {
  33. return '{{%saas_integral_order}}';
  34. }
  35. public function behaviors()
  36. {
  37. return [
  38. [
  39. 'class' => TimestampBehavior::class,
  40. 'attributes' => [
  41. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  42. ]
  43. ]
  44. ];
  45. }
  46. /**
  47. * {@inheritdoc}
  48. */
  49. public function rules()
  50. {
  51. return [
  52. [['store_id', 'goods_id', 'integral_goods_id', 'cost', 'user_id', 'created_at', 'is_clerk', 'clerk_id', 'is_delete'], 'integer'],
  53. ['order_no', 'string']
  54. ];
  55. }
  56. /**
  57. * {@inheritdoc}
  58. */
  59. public function attributeLabels()
  60. {
  61. return [
  62. 'id' => 'ID',
  63. 'store_id' => 'Store ID',
  64. 'goods_id' => '商品id',
  65. 'integral_goods_id' => '积分商品id',
  66. 'cost' => '花费的积分',
  67. 'user_id' => '用户id',
  68. 'is_clerk' => '是否核销',
  69. 'clerk_id' => '核销员id',
  70. 'created_at' => '创建时间',
  71. 'is_delete' => '是否删除',
  72. 'order_no' => '订单号'
  73. ];
  74. }
  75. }