From 2a85fc01b73355608bc4503e4aeda14bf07f5a5b Mon Sep 17 00:00:00 2001 From: Ashesh <3626859+Ashesh3@users.noreply.github.com> Date: Tue, 9 Jan 2024 23:43:27 +0530 Subject: [PATCH] Add video_connect_link field to User model (#1785) Add video_connect_link field to UserSerializer, UserAssignedSerializer, UserListSerializer, and User model --- care/users/api/serializers/user.py | 3 +++ .../migrations/0011_user_video_connect_link.py | 17 +++++++++++++++++ care/users/models.py | 1 + care/users/tests/test_api.py | 1 + 4 files changed, 22 insertions(+) create mode 100644 care/users/migrations/0011_user_video_connect_link.py diff --git a/care/users/api/serializers/user.py b/care/users/api/serializers/user.py index 0613b3437f..780a2ee76e 100644 --- a/care/users/api/serializers/user.py +++ b/care/users/api/serializers/user.py @@ -285,6 +285,7 @@ class Meta: "first_name", "last_name", "email", + "video_connect_link", "user_type", "doctor_qualification", "doctor_experience_commenced_on", @@ -377,6 +378,7 @@ class Meta: "home_facility_object", "doctor_qualification", "doctor_experience_commenced_on", + "video_connect_link", "doctor_medical_council_registration", "skills", ) @@ -413,4 +415,5 @@ class Meta: "last_login", "home_facility_object", "home_facility", + "video_connect_link", ) diff --git a/care/users/migrations/0011_user_video_connect_link.py b/care/users/migrations/0011_user_video_connect_link.py new file mode 100644 index 0000000000..452f049334 --- /dev/null +++ b/care/users/migrations/0011_user_video_connect_link.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.6 on 2023-12-26 17:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("users", "0010_rename_skills"), + ] + + operations = [ + migrations.AddField( + model_name="user", + name="video_connect_link", + field=models.URLField(blank=True, null=True), + ), + ] diff --git a/care/users/models.py b/care/users/models.py index 28ec87ed9e..fa41e241bc 100644 --- a/care/users/models.py +++ b/care/users/models.py @@ -230,6 +230,7 @@ class User(AbstractUser): blank=True, null=True, ) + video_connect_link = models.URLField(blank=True, null=True) gender = models.IntegerField(choices=GENDER_CHOICES, blank=False) age = models.IntegerField(validators=[MinValueValidator(1), MaxValueValidator(100)]) diff --git a/care/users/tests/test_api.py b/care/users/tests/test_api.py index 8718312db7..950486b499 100644 --- a/care/users/tests/test_api.py +++ b/care/users/tests/test_api.py @@ -42,6 +42,7 @@ def get_detail_representation(self, obj=None) -> dict: "doctor_medical_council_registration": obj.doctor_medical_council_registration, "doctor_qualification": obj.doctor_qualification, "weekly_working_hours": obj.weekly_working_hours, + "video_connect_link": obj.video_connect_link, **self.get_local_body_district_state_representation(obj), }