diff --git a/users/migrations/0010_user_contest_ability_user_contest_certification_and_more.py b/users/migrations/0010_user_contest_ability_user_contest_certification_and_more.py new file mode 100644 index 0000000..d5daedc --- /dev/null +++ b/users/migrations/0010_user_contest_ability_user_contest_certification_and_more.py @@ -0,0 +1,43 @@ +# Generated by Django 4.0 on 2024-02-03 05:35 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0009_material_user_special_material'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='contest_ability', + field=models.TextField(blank=True, null=True), + ), + migrations.AddField( + model_name='user', + name='contest_certification', + field=models.FileField(blank=True, null=True, upload_to=''), + ), + migrations.AddField( + model_name='user', + name='etc_ability', + field=models.TextField(blank=True, null=True), + ), + migrations.AddField( + model_name='user', + name='etc_certification', + field=models.FileField(blank=True, null=True, upload_to=''), + ), + migrations.AddField( + model_name='user', + name='freelancer_ability', + field=models.TextField(blank=True, null=True), + ), + migrations.AddField( + model_name='user', + name='freelancer_certification', + field=models.FileField(blank=True, null=True, upload_to=''), + ), + ] diff --git a/users/models.py b/users/models.py index 52ddb13..b990926 100644 --- a/users/models.py +++ b/users/models.py @@ -76,12 +76,24 @@ class User(AbstractBaseUser, PermissionsMixin): #리폼러 가입시 필요 필드 area = models.CharField(max_length=50, blank=True, null=True) + #학력 school_ability = models.TextField(blank=True, null=True) school_certification = models.FileField(blank=True, null=True) + #실무,인턴 career_ability = models.TextField(blank=True, null=True) career_certification = models.FileField(blank=True, null=True) + #자격증 license_ability = models.TextField(blank=True, null=True) license_certification = models.FileField(blank=True, null=True) + #프리랜서 + freelancer_ability = models.TextField(blank=True, null=True) + freelancer_certification = models.FileField(blank=True, null = True) + #공모전 + contest_ability = models.TextField(blank=True, null=True) + contest_certification = models.FileField(blank=True, null = True) + #기타 + etc_ability = models.TextField(blank=True, null=True) + etc_certification = models.FileField(blank=True, null = True) work_style = models.ManyToManyField("users.Style", related_name = 'styled_refomers', blank=True) links = models.TextField(blank=True, null=True) market_name = models.CharField(max_length=50, blank=True, null=True) diff --git a/users/services.py b/users/services.py index 5d66b67..b4a8f7e 100644 --- a/users/services.py +++ b/users/services.py @@ -52,6 +52,12 @@ def reformer_sign_up( career_certification : InMemoryUploadedFile, license_ability : str, license_certification: InMemoryUploadedFile, + freelancer_ability : str, + freelancer_certification: InMemoryUploadedFile, + contest_ability : str, + contest_certification: InMemoryUploadedFile, + etc_ability : str, + etc_certification: InMemoryUploadedFile, special_material : list[str], ): @@ -78,6 +84,12 @@ def reformer_sign_up( career_certification = career_certification, license_ability = license_ability, license_certification = license_certification, + freelancer_ability = freelancer_ability, + freelancer_certification = freelancer_certification, + contest_ability = contest_ability, + contest_certification = contest_certification, + etc_ability = etc_ability, + etc_certification = etc_certification, ) user.set_password(password) diff --git a/users/views.py b/users/views.py index 2dbdfbd..917309b 100644 --- a/users/views.py +++ b/users/views.py @@ -35,6 +35,12 @@ class ReformerSignupInputSerializer(serializers.Serializer): career_certification = serializers.FileField(required = False) license_ability =serializers.CharField(required = False) license_certification = serializers.FileField(required = False) + freelancer_ability =serializers.CharField(required = False) + freelancer_certification = serializers.FileField(required = False) + contest_ability =serializers.CharField(required = False) + contest_certification = serializers.FileField(required = False) + etc_ability =serializers.CharField(required = False) + etc_certification = serializers.FileField(required = False) special_material = serializers.ListField(required = False) def post(self, request): @@ -61,6 +67,12 @@ def post(self, request): career_certification = data.get('career_certification', None), license_ability =data.get('license_ability', None), license_certification = data.get('license_certification', None), + freelancer_ability =data.get('license_ability', None), + freelancer_certification = data.get('license_certification', None), + contest_ability =data.get('license_ability', None), + contest_certification = data.get('license_certification', None), + etc_ability =data.get('license_ability', None), + etc_certification = data.get('license_certification', None), special_material = data.get('special_material', []), )