Config.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. namespace common\models\extend;
  3. use common\behaviors\MerchantBehavior;
  4. /**
  5. * This is the model class for table "{{%extend_config}}".
  6. *
  7. * @property int $id 主键
  8. * @property int|null $merchant_id 商户id
  9. * @property string|null $title 配置标题
  10. * @property string|null $name 配置标识
  11. * @property string|null $type 配置类型
  12. * @property string|null $remark 说明
  13. * @property string|null $data 配置
  14. * @property int|null $sort 排序
  15. * @property int|null $extend 扩展字段
  16. * @property int|null $is_addon 是否插件
  17. * @property string|null $addon_name 插件名称
  18. * @property int|null $status 状态[-1:删除;0:禁用;1启用]
  19. * @property int|null $created_at 创建时间
  20. * @property int|null $updated_at 修改时间
  21. */
  22. class Config extends \common\models\base\BaseModel
  23. {
  24. use MerchantBehavior;
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%extend_config}}';
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function rules()
  36. {
  37. return [
  38. [['title'], 'required'],
  39. [['merchant_id', 'sort', 'extend', 'is_addon', 'status', 'created_at', 'updated_at'], 'integer'],
  40. [['data'], 'safe'],
  41. [['title', 'name'], 'string', 'max' => 50],
  42. [['type'], 'string', 'max' => 30],
  43. [['remark'], 'string', 'max' => 1000],
  44. [['addon_name'], 'string', 'max' => 200],
  45. ];
  46. }
  47. /**
  48. * {@inheritdoc}
  49. */
  50. public function attributeLabels()
  51. {
  52. return [
  53. 'id' => '主键',
  54. 'merchant_id' => '商户id',
  55. 'title' => '配置标题',
  56. 'name' => '配置标识',
  57. 'type' => '配置类型',
  58. 'remark' => '备注',
  59. 'data' => '配置',
  60. 'sort' => '排序',
  61. 'extend' => '扩展字段',
  62. 'is_addon' => '是否插件',
  63. 'addon_name' => '插件名称',
  64. 'status' => '状态',
  65. 'created_at' => '创建时间',
  66. 'updated_at' => '修改时间',
  67. ];
  68. }
  69. }
粤ICP备19079148号