DiyTemplate.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 "{{%diy_template}}".
  11. *
  12. * @property integer $id
  13. * @property integer $store_id
  14. * @property string $name
  15. * @property string $template
  16. * @property integer $is_delete
  17. * @property integer $addtime
  18. * @property integer $index
  19. * @property string $type
  20. */
  21. class DiyTemplate extends \yii\db\ActiveRecord
  22. {
  23. /**
  24. * @inheritdoc
  25. */
  26. public static function tableName()
  27. {
  28. return '{{%diy_template}}';
  29. }
  30. /**
  31. * @inheritdoc
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [['store_id', 'template', 'addtime'], 'required'],
  37. [['store_id', 'is_delete', 'addtime', 'is_index'], 'integer'],
  38. [['template', 'type'], 'string'],
  39. [['name', 'type'], 'string', 'max' => 45],
  40. ];
  41. }
  42. /**
  43. * @inheritdoc
  44. */
  45. public function attributeLabels()
  46. {
  47. return [
  48. 'id' => 'ID',
  49. 'store_id' => 'Store ID',
  50. 'name' => 'Name',
  51. 'template' => 'Template',
  52. 'is_delete' => 'Is Delete',
  53. 'addtime' => 'Addtime',
  54. 'type' => '类型 index 首页,user 用户中心,goods 商品详情',
  55. 'is_index' => '是否设为首页'
  56. ];
  57. }
  58. }