EventFormDetail.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace app\models;
  3. use Yii;
  4. use yii\behaviors\TimestampBehavior;
  5. /**
  6. * This is the model class for table "cyy_event_form_detail".
  7. *
  8. * @property int $id
  9. * @property int|null $store_id
  10. * @property int|null $created_at
  11. * @property int|null $updated_at
  12. * @property int|null $is_delete 是否删除:0=否;1=是;
  13. * @property int|null $event_user_id event_user表关联ID
  14. * @property int|null $user_id 用户ID
  15. * @property int|null $event_id 活动ID
  16. * @property int|null $form_type 表单类型:1=企业;2=机构;
  17. * @property string|null $key 表单key
  18. * @property string|null $value 表单value
  19. * @property string $type 表单信息类型
  20. */
  21. class EventFormDetail extends \yii\db\ActiveRecord
  22. {
  23. public static function tableName()
  24. {
  25. return 'cyy_event_form_detail';
  26. }
  27. public function behaviors()
  28. {
  29. return [
  30. [
  31. // 自动更新创建和更新时间
  32. 'class' => TimestampBehavior::class,
  33. 'value' => time()
  34. ]
  35. ];
  36. }
  37. public function rules()
  38. {
  39. return [
  40. [['store_id', 'created_at', 'updated_at', 'event_user_id', 'user_id', 'event_id', 'form_type', 'is_delete'], 'integer'],
  41. [['type'], 'required'],
  42. [['key', 'value', 'type'], 'string', 'max' => 255],
  43. ];
  44. }
  45. public function attributeLabels()
  46. {
  47. return [
  48. 'id' => 'ID',
  49. 'store_id' => '商城ID',
  50. 'is_delete' => '是否删除',
  51. 'created_at' => '创建时间',
  52. 'updated_at' => '更新时间',
  53. 'event_user_id' => 'event_user表关联ID',
  54. 'user_id' => '用户ID',
  55. 'event_id' => '活动ID',
  56. 'form_type' => '表单类型',
  57. 'key' => '字段名(key)',
  58. 'value' => '字段值',
  59. 'type' => '字段类型',
  60. ];
  61. }
  62. }