ActivityOrdervoucher.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. /**
  11. * This is the model class for table "{{%alipay_voucher_code}}".
  12. *
  13. * @property int $id
  14. * @property int $mini_id
  15. * @property int $store_id
  16. * @property int $coupon_id 优惠券id
  17. * @property int $alipay_activity_id 支付宝商家券活动id
  18. * @property int $publish_start_time
  19. * @property int $publish_end_time
  20. * @property int $status
  21. * @property int $is_delete 是否删除
  22. * @property int $created_at 添加时间
  23. * @property int $updated_at 更新时间
  24. */
  25. class ActivityOrdervoucher extends ActiveRecord
  26. {
  27. public static function tableName()
  28. {
  29. return '{{%alipay_activity_ordervoucher}}';
  30. }
  31. public function behaviors()
  32. {
  33. return [
  34. [
  35. // 自动更新创建和更新时间
  36. 'class' => TimestampBehavior::class,
  37. 'value' => null
  38. ]
  39. ];
  40. }
  41. public function rules()
  42. {
  43. return [
  44. [['id', 'coupon_id', 'store_id', 'mini_id'], 'integer'],
  45. [['create_at', 'update_at', 'is_delete', 'alipay_activity_id'], 'safe']
  46. ];
  47. }
  48. public function attributeLabels()
  49. {
  50. return [
  51. 'id' => 'ID',
  52. 'mini_id' => 'store_id',
  53. 'store_id' => 'store_id',
  54. 'coupon_id' => 'coupon_id',
  55. 'alipay_activity_id' => '支付宝商家券活动id',
  56. 'is_delete' => '删除',
  57. 'create_at' => '创建时间',
  58. 'update_at' => '更新时间',
  59. ];
  60. }
  61. }