AddonsSmartFormTemplateUserFormInfo.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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_template_user_form_info}}".
  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 AddonsSmartFormTemplateUserFormInfo 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_template_user_form_info}}';
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['smart_form_template_id','user_id','smart_form_template_user_form_id','smart_form_components_id'], 'required'],
  34. [['smart_form_template_id','user_id','smart_form_template_user_form_id','smart_form_components_id','created_at','updated_at'], 'integer'],
  35. [['col_value'], 'string'],
  36. ];
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => '主键' ,
  45. 'smart_form_template_id' => '智能装修表单管理id',
  46. 'smart_form_template_user_form_id' => '用户填写智能表单id',
  47. 'user_id' => '用户id',
  48. 'smart_form_components_id' => '智能装修表单明细字段id',
  49. 'smart_form_components_code' => '智能装修组件标识',
  50. 'smart_form_components_title' => '标题',
  51. 'col_value' => '填写字段值',
  52. 'created_at' => '创建时间',
  53. 'updated_at' => '修改时间',
  54. ];
  55. }
  56. public function getColumn()
  57. {
  58. return $this->hasOne(AddonsSmartFormTemplateColumn::class, ['id' => 'smart_form_components_id']);
  59. }
  60. }