PtActivityBanner.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\behaviors\TimestampBehavior;
  9. use yii\db\ActiveRecord;
  10. /**
  11. * This is the model class for table "{{%pt_activity_banner}}".
  12. *
  13. * @property integer $id
  14. * @property string $name
  15. * @property integer $created_at
  16. * @property integer $updated_at
  17. * @property integer $is_delete
  18. * @property integer $store_id
  19. * @property integer $status
  20. * @property string $cover_pic
  21. * @property integer $sort
  22. * @property string $url
  23. */
  24. class PtActivityBanner extends \yii\db\ActiveRecord
  25. {
  26. /**
  27. * @inheritdoc
  28. */
  29. public static function tableName()
  30. {
  31. return '{{%pt_activity_banner}}';
  32. }
  33. public function behaviors()
  34. {
  35. return [
  36. [
  37. 'class' => TimestampBehavior::class,
  38. 'attributes' => [
  39. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  40. ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
  41. ]
  42. ]
  43. ];
  44. }
  45. /**
  46. * @inheritdoc
  47. */
  48. public function rules()
  49. {
  50. return [
  51. [['id', 'store_id', 'is_delete', 'status', 'sort'], 'integer'],
  52. [['name', 'cover_pic', 'url'], 'string'],
  53. [['created_at', 'updated_at'], 'safe']
  54. ];
  55. }
  56. /**
  57. * @inheritdoc
  58. */
  59. public function attributeLabels()
  60. {
  61. return [
  62. 'id' => '',
  63. 'name' => '活动名称',
  64. 'created_at' => '',
  65. 'updated_at' => '',
  66. 'is_delete' => 'IS Delete',
  67. 'store_id' => 'Store ID',
  68. 'status' => '状态 0禁用 1启用',
  69. 'cover_pic' => '封面图片',
  70. 'sort' => '轮播排序',
  71. 'url' => '广告链接',
  72. ];
  73. }
  74. }