AddonsSmartFormComponents.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. namespace addons\SmartForm\common\models;
  3. use common\enums\StatusEnum;
  4. use common\models\mall\MallAddons;
  5. use common\models\user\User;
  6. use Yii;
  7. use yii\db\Exception;
  8. /**
  9. * This is the model class for table "{{%addons_smart_form_components}}".
  10. *
  11. * @property int $id
  12. * @property int $mall_id 商城ID
  13. * @property int|null $status 状态[-1:删除;0:禁用;1启用]
  14. * @property int $created_at 创建时间
  15. * @property int $updated_at 修改时间
  16. */
  17. class AddonsSmartFormComponents extends \common\models\base\BaseActiveRecord
  18. {
  19. const ADDONS_NAME = 'SmartForm';
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public static function tableName()
  24. {
  25. return '{{%addons_smart_form_components}}';
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['code','title'], 'required'],
  34. [['sort', 'status', 'created_at', 'updated_at'], 'integer'],
  35. [['name'], 'string', 'max' => 150],
  36. ];
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => '主键',
  45. 'code' => '标识',
  46. 'title' => '标题',
  47. 'group' => '组件分组',
  48. 'icon' => '图标',
  49. 'permission' => '组件操作参数',
  50. 'sort' => '排序,越小排越前',
  51. 'status' => '状态[-1:删除;0:禁用;1启用]',
  52. 'created_at' => '添加时间',
  53. 'updated_at' => '修改时间',
  54. ];
  55. }
  56. }