WxCard.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 WxCard extends ActiveRecord
  11. {
  12. public static function tableName()
  13. {
  14. return '{{%wx_card}}';
  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'], 'integer'],
  30. [['create_at', 'update_at', 'is_delete', 'card_id', 'title', 'brand_name', 'logo_url', 'background_pic_url', 'prerogative', 'wx_materials'], 'safe'],
  31. ];
  32. }
  33. public function attributeLabels()
  34. {
  35. return [
  36. 'id' => 'ID',
  37. 'card_id' => 'card_id',
  38. 'store_id' => 'store_id',
  39. 'title' => '名称',
  40. 'brand_name' => '品牌名称',
  41. 'logo_url' => 'logo_url',
  42. 'background_pic_url' => '背景',
  43. 'prerogative' => '特殊说明',
  44. 'is_delete' => '删除',
  45. 'create_at' => '创建时间',
  46. 'update_at' => '更新时间',
  47. 'wx_materials' => '微信素材列表',
  48. ];
  49. }
  50. }