# Path: wye/base/constants.py
# class FeedbackType:
#     _PRESENTER = [1, "Presenter"]
#     _ORGANISATION = [2, "Organisation"]
# 
# class WorkshopLevel:
#     _BEGINNER = [1, "Beginner"]
#     _INTERMEDIATE = [2, "Intermediate"]
#     _ADVANCE = [2, "Advance"]
# 
# class WorkshopStatus:
#     _DRAFT = [1, "Draft"]
#     _REQUESTED = [2, "Workshop Requested"]
#     _ACCEPTED = [3, "Workshop Accepted "]
#     _DECLINED = [4, "Workshop Declined"]
#     _FEEDBACK_PENDING = [5, "FeedBack Pending"]
#     _HOLD = [6, "Workshop On Hold"]
#     _COMPLETED = [7, "Workshop Completed"]
#     _UNABLE_TO_COMPLETE = [8, "Workshop unable to complete"]
# 
# class YesNO:
#     _YES = [1, "Yes"]
#     _NO = [2, "No"]
# 
# class WorkshopAudience:
#     _BE_FINAL_YEAR = [1, "Engineering 4th Year"]
#     _BE_THIRD_YEAR = [2, "Engineering 3rd Year"]
#     _BE_SECOND_YEAR = [3, "Engineering 2ndYear"]
#     _BE_FIRST_YEAR = [4, "Engineering 1st Year"]
#     _MASTER_FINAL_YEAR = [5, "MCA Final Year"]
#     _MASTER_SECOND_YEAR = [6, "MCA Second Year"]
#     _MASTER_FIRST_YEAR = [7, "MCA First Year"]
#     _DIPLOMA_THIRD_YEAR = [8, "Diploma 3rd Year"]
#     _DIPLOMA_SECOND_YEAR = [9, "Diploma 2nd Year"]
#     _DIPLOMA_FIRST_YEAR = [10, "Diploma 1st Year"]
#     _TEN_PLUS_TWO = [11, "10+2"]
#     _TEN_PLUD_ONE = [12, "10+1"]
#     _SCHOOL = [13, "School"]
#     _OTHERS = [14, "Others"]
# 
# Path: wye/organisations/models.py
# class Organisation(AuditModel):
#     organisation_type = models.PositiveSmallIntegerField(
#         choices=OrganisationType.CHOICES, verbose_name="organisation type")
#     name = models.CharField(max_length=300, unique=True)
#     description = models.TextField()
#     full_address = models.TextField(blank=True, null=True)
#     location = models.ForeignKey(Location)
#     pincode = models.CharField(max_length=6, blank=True, null=True)
#     address_map_url = models.URLField(blank=True, null=True)
#     organisation_role = models.CharField(
#         max_length=300, verbose_name="Your position in organisation")
#     user = models.ManyToManyField(User, related_name='organisation_users')
#     active = models.BooleanField(default=True)
#     students = models.ManyToManyField(
#         User,
#         related_name='organisation_students',
#         blank=True)
# 
#     @classmethod
#     def list_user_organisations(cls, user):
#         return cls.objects.filter(user=user, active=True)
# 
#     @property
#     def get_organisation_user_list(self):
#         return self.user.all()
# 
#     def toggle_active(self, logged_user, **kwargs):
#         """
#         Helper method to toggle active flag for the model.
#         """
# 
#         action_map = {'active': True, 'deactive': False}
#         action = kwargs.get('action')
#         # check if user is only poc for the organisation
#         self.user.remove(logged_user)
#         if not self.user.count():
#             # if there are no more poc for this organisation disable it
#             # else Organisation will be active
#             self.active = action_map.get(action)
#             self.save()
# 
#         return {
#             'status': True,
#             'msg': 'Organisation disabled'}
# 
#     class Meta:
#         db_table = 'organisations'
# 
#     def __str__(self):
#         return '{} , {}'.format(self.name, self.location)


from django.contrib.auth.models import User
from django.db import models
from wye.base.constants import (
    FeedbackType,
    WorkshopLevel,
    WorkshopStatus,
    YesNO,
    WorkshopAudience
)
from wye.base.models import TimeAuditModel
from wye.organisations.models import Organisation
        Organisation, related_name='workshop_requester')
    presenter = models.ManyToManyField(User, related_name='workshop_presenter')
    # location = models.ForeignKey(Location, related_name='workshop_location')
    workshop_level = models.PositiveSmallIntegerField(
        choices=WorkshopLevel.CHOICES, verbose_name="Workshop Level")
    workshop_section = models.ForeignKey(WorkshopSections)
    number_of_volunteers = models.PositiveSmallIntegerField(
        default=0, null=True, blank=True)
    volunteer = models.ManyToManyField(User, related_name='workshop_volunteer')
    is_active = models.BooleanField(default=True)
    status = models.PositiveSmallIntegerField(
        choices=WorkshopStatus.CHOICES, verbose_name="Current Status",
        default=WorkshopStatus.REQUESTED)
    travel_reimbursement = models.PositiveSmallIntegerField(
        choices=YesNO.CHOICES,
        verbose_name="Travel Reimbursement Support",
        default=YesNO.NO)
    hotel_reimbursement = models.PositiveSmallIntegerField(
        choices=YesNO.CHOICES,
        verbose_name="Stay Reimbursement Support",
        default=YesNO.NO)
    budget = models.CharField(max_length=5, null=True)
    reimbursement_mode = models.TextField(null=True)
    tutor_reimbursement_flag = models.PositiveSmallIntegerField(
        choices=YesNO.CHOICES,
        verbose_name=" Do you need Travel/Stay reimbursement ?",
        default=YesNO.NO)
    comments = models.TextField()
    target_audience = models.PositiveSmallIntegerField(
        choices=WorkshopAudience.CHOICES, verbose_name="Audience",

# Path: wye/base/constants.py
# class FeedbackType:
#     _PRESENTER = [1, "Presenter"]
#     _ORGANISATION = [2, "Organisation"]
# 
# class WorkshopLevel:
#     _BEGINNER = [1, "Beginner"]
#     _INTERMEDIATE = [2, "Intermediate"]
#     _ADVANCE = [2, "Advance"]
# 
# class WorkshopStatus:
#     _DRAFT = [1, "Draft"]
#     _REQUESTED = [2, "Workshop Requested"]
#     _ACCEPTED = [3, "Workshop Accepted "]
#     _DECLINED = [4, "Workshop Declined"]
#     _FEEDBACK_PENDING = [5, "FeedBack Pending"]
#     _HOLD = [6, "Workshop On Hold"]
#     _COMPLETED = [7, "Workshop Completed"]
#     _UNABLE_TO_COMPLETE = [8, "Workshop unable to complete"]
# 
# class YesNO:
#     _YES = [1, "Yes"]
#     _NO = [2, "No"]
# 
# class WorkshopAudience:
#     _BE_FINAL_YEAR = [1, "Engineering 4th Year"]
#     _BE_THIRD_YEAR = [2, "Engineering 3rd Year"]
#     _BE_SECOND_YEAR = [3, "Engineering 2ndYear"]
#     _BE_FIRST_YEAR = [4, "Engineering 1st Year"]
#     _MASTER_FINAL_YEAR = [5, "MCA Final Year"]
#     _MASTER_SECOND_YEAR = [6, "MCA Second Year"]
#     _MASTER_FIRST_YEAR = [7, "MCA First Year"]
#     _DIPLOMA_THIRD_YEAR = [8, "Diploma 3rd Year"]
#     _DIPLOMA_SECOND_YEAR = [9, "Diploma 2nd Year"]
#     _DIPLOMA_FIRST_YEAR = [10, "Diploma 1st Year"]
#     _TEN_PLUS_TWO = [11, "10+2"]
#     _TEN_PLUD_ONE = [12, "10+1"]
#     _SCHOOL = [13, "School"]
#     _OTHERS = [14, "Others"]
# 
# Path: wye/organisations/models.py
# class Organisation(AuditModel):
#     organisation_type = models.PositiveSmallIntegerField(
#         choices=OrganisationType.CHOICES, verbose_name="organisation type")
#     name = models.CharField(max_length=300, unique=True)
#     description = models.TextField()
#     full_address = models.TextField(blank=True, null=True)
#     location = models.ForeignKey(Location)
#     pincode = models.CharField(max_length=6, blank=True, null=True)
#     address_map_url = models.URLField(blank=True, null=True)
#     organisation_role = models.CharField(
#         max_length=300, verbose_name="Your position in organisation")
#     user = models.ManyToManyField(User, related_name='organisation_users')
#     active = models.BooleanField(default=True)
#     students = models.ManyToManyField(
#         User,
#         related_name='organisation_students',
#         blank=True)
# 
#     @classmethod
#     def list_user_organisations(cls, user):
#         return cls.objects.filter(user=user, active=True)
# 
#     @property
#     def get_organisation_user_list(self):
#         return self.user.all()
# 
#     def toggle_active(self, logged_user, **kwargs):
#         """
#         Helper method to toggle active flag for the model.
#         """
# 
#         action_map = {'active': True, 'deactive': False}
#         action = kwargs.get('action')
#         # check if user is only poc for the organisation
#         self.user.remove(logged_user)
#         if not self.user.count():
#             # if there are no more poc for this organisation disable it
#             # else Organisation will be active
#             self.active = action_map.get(action)
#             self.save()
# 
#         return {
#             'status': True,
#             'msg': 'Organisation disabled'}
# 
#     class Meta:
#         db_table = 'organisations'
# 
#     def __str__(self):
#         return '{} , {}'.format(self.name, self.location)


# Path: wye/workshops/models.py
from django.contrib.auth.models import User
from django.db import models
from wye.base.constants import (
    FeedbackType,
    WorkshopLevel,
    WorkshopStatus,
    YesNO,
    WorkshopAudience
)
from wye.base.models import TimeAuditModel
from wye.organisations.models import Organisation

        Organisation, related_name='workshop_requester')
    presenter = models.ManyToManyField(User, related_name='workshop_presenter')
    # location = models.ForeignKey(Location, related_name='workshop_location')
    workshop_level = models.PositiveSmallIntegerField(
        choices=WorkshopLevel.CHOICES, verbose_name="Workshop Level")
    workshop_section = models.ForeignKey(WorkshopSections)
    number_of_volunteers = models.PositiveSmallIntegerField(
        default=0, null=True, blank=True)
    volunteer = models.ManyToManyField(User, related_name='workshop_volunteer')
    is_active = models.BooleanField(default=True)
    status = models.PositiveSmallIntegerField(
        choices=WorkshopStatus.CHOICES, verbose_name="Current Status",
        default=WorkshopStatus.REQUESTED)
    travel_reimbursement = models.PositiveSmallIntegerField(
        choices=YesNO.CHOICES,
        verbose_name="Travel Reimbursement Support",
        default=YesNO.NO)
    hotel_reimbursement = models.PositiveSmallIntegerField(
        choices=YesNO.CHOICES,
        verbose_name="Stay Reimbursement Support",
        default=YesNO.NO)
    budget = models.CharField(max_length=5, null=True)
    reimbursement_mode = models.TextField(null=True)
    tutor_reimbursement_flag = models.PositiveSmallIntegerField(
        choices=YesNO.CHOICES,
        verbose_name=" Do you need Travel/Stay reimbursement ?",
        default=YesNO.NO)
    comments = models.TextField()
    target_audience = models.PositiveSmallIntegerField(
        choices=WorkshopAudience.CHOICES, verbose_name="Audience",

        default=WorkshopAudience.BE_FINAL_YEAR)