UserCard.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. /**
  10. * This is the model class for table "{{%user_card}}".
  11. *
  12. * @property int $id
  13. * @property int|null $store_id
  14. * @property int|null $user_id 用户ID
  15. * @property int|null $card_id 卡券ID
  16. * @property string|null $card_name 卡券名称
  17. * @property string|null $card_pic_url
  18. * @property string|null $card_content 卡券描述
  19. * @property int|null $is_use 是否使用 0--未使用 1--已使用
  20. * @property int|null $is_delete
  21. * @property int|null $created_at
  22. * @property int|null $clerk_id 核销人id
  23. * @property int|null $shop_id 店铺ID
  24. * @property int|null $clerk_time 核销时间
  25. * @property int $order_id 发放卡券的订单id
  26. * @property int $goods_id 商品ID
  27. */
  28. class UserCard extends \yii\db\ActiveRecord
  29. {
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public static function tableName()
  34. {
  35. return '{{%user_card}}';
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function rules()
  41. {
  42. return [
  43. [['store_id', 'user_id', 'card_id', 'is_use', 'is_delete', 'created_at', 'clerk_id', 'shop_id', 'clerk_time',
  44. 'order_id', 'goods_id'], 'integer'],
  45. [['card_content'], 'string'],
  46. [['card_name'], 'string', 'max' => 255],
  47. [['card_pic_url'], 'string', 'max' => 2048],
  48. ];
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. 'id' => 'ID',
  57. 'store_id' => 'Store ID',
  58. 'user_id' => '用户ID',
  59. 'card_id' => '卡券ID',
  60. 'card_name' => '卡券名称',
  61. 'card_pic_url' => 'Card Pic Url',
  62. 'card_content' => '卡券描述',
  63. 'is_use' => '是否使用 0--未使用 1--已使用',
  64. 'is_delete' => 'Is Delete',
  65. 'created_at' => 'Created At',
  66. 'clerk_id' => '核销人id',
  67. 'shop_id' => '店铺ID',
  68. 'clerk_time' => ' 核销时间',
  69. 'order_id' => '发放卡券的订单id',
  70. 'goods_id' => '商品ID',
  71. ];
  72. }
  73. }