WxCardBind.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. class WxCardBind extends ActiveRecord
  11. {
  12. public static function tableName()
  13. {
  14. return '{{%wx_card_bind}}';
  15. }
  16. public function behaviors()
  17. {
  18. return [
  19. [
  20. // 自动更新创建和更新时间
  21. 'class' => TimestampBehavior::class,
  22. 'value' => null
  23. ]
  24. ];
  25. }
  26. public function rules()
  27. {
  28. return [
  29. [['id', 'store_id', 'user_id'], 'integer'],
  30. [['create_at', 'update_at', 'is_delete', 'card_id', 'code', 'phone', 'openid', 'outer_str'], 'safe'],
  31. ];
  32. }
  33. public function attributeLabels()
  34. {
  35. return [
  36. 'id' => 'ID',
  37. 'card_id' => 'card_id',
  38. 'store_id' => 'store_id',
  39. 'code' => 'code',
  40. 'phone' => 'phone',
  41. 'openid' => 'openid',
  42. 'user_id' => 'user_id',
  43. 'outer_str' => 'outer_str',
  44. 'is_delete' => '删除',
  45. 'create_at' => '创建时间',
  46. 'update_at' => '更新时间',
  47. ];
  48. }
  49. }