Conversion_Kitchen_Code/kitchen_counter/conversion/_.py

445 lines
21 KiB
Python
Executable File

from locale import currency
from django.db import models
from django.contrib.auth.models import User
from django.contrib.postgres.fields import ArrayField
from django import forms
import jsonfield
import uuid
import os
import time
import datetime
from numpy import size
from pytz import timezone
# Create your models here.
class MNFScriptDatabase(models.Model):
user_id = models.ForeignKey(User, on_delete=models.CASCADE)
date_at = models.DateTimeField(auto_now=True)
script_id = models.CharField(max_length=100, blank=True)
script_title = models.CharField(max_length=100, blank=True)
author_name = models.CharField(max_length=100, blank=True)
actionline_language = models.CharField(max_length=100, blank=True)
actionline_script_language = models.CharField(max_length=100, blank=True)
dialogues_language = models.CharField(max_length=100, blank=True)
dialogues_script_language = models.CharField(max_length=100, blank=True)
# genre = models.CharField(max_length=100, blank=True)
document_name = models.CharField(max_length=225)
script = models.FileField(upload_to="scripts/")
pitchdeck_item = models.CharField(default="", max_length=100)
script_file_path = models.CharField(default="", max_length=100)
scene_vector = models.CharField(default="", max_length=100)
character_vector = models.CharField(default="", max_length=100)
dialogues_vector = models.CharField(default="", max_length=100)
script_vector = models.CharField(default="", max_length=100)
Location_Vector = models.CharField(default="", max_length=100)
Global_Vector = models.CharField(default="", max_length=100)
script_file_pdf_path = models.CharField(default="", max_length=100)
narration_video_path = models.CharField(default="", max_length=100)
character_intro_video_path = models.CharField(default="", max_length=100)
line_by_line_narration_video_path = models.CharField(
default="", max_length=100
) # rohit edited on 26th December #1
linebyline = models.CharField(default="", max_length=100)
character_intro = models.CharField(default="", max_length=100) # 2
screenplay_analysis = models.CharField(default="", max_length=100) # 3
elevator_pitch = models.CharField(default="", max_length=100) # 4
onepager = models.CharField(default="", max_length=100) # 5
nondial_src_language = models.CharField(max_length=100, blank=True)
screenplay_analysis_video_path = models.CharField(default="", max_length=100)
elevator_pitch_video_path = models.CharField(default="", max_length=100)
onepager_pdf_path = models.CharField(default="", max_length=100)
dial_src_language = models.CharField(max_length=100, blank=True)
dial_dest_language = models.CharField(max_length=100, blank=True)
dial_dest_script = models.CharField(max_length=100, blank=True)
nondial_dest_language = models.CharField(max_length=100, blank=True)
nondial_src_script = models.CharField(max_length=100, blank=True)
dial_src_script = models.CharField(max_length=100, blank=True)
dual_dial_script = models.CharField(max_length=100, blank=True)
translated_script_path = models.CharField(default="", max_length=100)
languages = models.CharField(default="", max_length=100, blank=True)
forWhat = models.CharField(default="", max_length=100, blank=True)
numPages = models.IntegerField(default=1)
payment_intent_id = models.CharField(default="", max_length=256)
def __str__(self):
return self.script_id
RATING_CHOICES = (
("1", "1"),
("1.5", "1.5"),
("2", "2"),
("2.5", "2.5"),
("3", "3"),
("3.5", "3.5"),
("4", "4"),
("4.5", "4.5"),
("5", "5"),
)
class Author(models.Model):
uuid = models.UUIDField(
max_length=36, primary_key=True, default=uuid.uuid4, editable=False
)
name = models.CharField(max_length=100, blank=True)
author_profile = models.FileField(upload_to="profile_pic/", blank=True, null=True)
author_about = models.CharField(max_length=100, blank=True)
author_email = models.CharField(default="", max_length=100)
phonenumber = models.CharField(default="", max_length=100)
author_link = models.CharField(default="", max_length=100)
class PitchVector(models.Model):
# choosescript = models.FileField(upload_to='scripts/', blank=True, null=True)
# pitchdeck = models.CharField(max_length=100, blank=True)
scriptDetails = models.ForeignKey(MNFScriptDatabase, on_delete=models.CASCADE)
script_id=models.CharField(max_length=100,blank=True)
scriptname = models.CharField(max_length=100, blank=True)
genre = models.CharField(max_length=100, blank=True)
subGenre = models.CharField(max_length=100, blank=True)
projecttype = models.CharField(max_length=100, blank=True)
noepisodes = models.CharField(max_length=100, blank=True)
eachepisodes = models.CharField(max_length=100, blank=True)
other = models.CharField(max_length=100, blank=True)
language = models.CharField(max_length=100, blank=True)
platformproposed = models.CharField(max_length=100, blank=True)
country = models.CharField(max_length=100, blank=True)
state = models.CharField(max_length=100, blank=True)
city = models.CharField(max_length=100, blank=True)
languagebelt = models.CharField(max_length=100, blank=True)
target_audience = models.CharField(max_length=100, blank=True)
target_field = models.CharField(max_length=100, blank=True)
timeperiod = models.CharField(max_length=100, blank=True)
geography = models.CharField(max_length=100, blank=True)
dialogue_reference = models.CharField(max_length=100, blank=True)
premise = models.CharField(max_length=100, blank=True)
logline = models.CharField(max_length=100, blank=True)
# Author details
# author_details = ArrayField(ArrayField(models.CharField(max_length=20, null=True, blank=True),size=5, default=list),size=5, default=list)
#auth_details = jsonfield.JSONField()
author_details = models.ManyToManyField(
Author,
related_name="author_details",
default="",
null=True,
blank=True,
)
author = models.BooleanField(default=False)
author1 = models.CharField(max_length=100, blank=True)
name = models.CharField(max_length=100, blank=True)
author_profile = models.FileField(upload_to="profile_pic/", blank=True, null=True)
author_about = models.CharField(max_length=100, blank=True)
author_email = models.CharField(default="", max_length=100)
phonenumber = models.CharField(default="", max_length=100)
author_link = models.CharField(default="", max_length=100)
# Plot and story flow
plot_story_flow = models.BooleanField(default=False)
protagonist = models.CharField(max_length=100, blank=True)
barrier = models.CharField(max_length=100, blank=True)
midpoint = models.CharField(max_length=100, blank=True)
climax = models.CharField(max_length=100, blank=True)
conflictresolved = models.CharField(max_length=100, blank=True)
minute_protogonist = models.CharField(max_length=100, blank=True)
conflict_reaches_climax = models.CharField(max_length=100, blank=True)
# About shooting
shooting = models.BooleanField(default=False)
pre_production = models.CharField(max_length=100, blank=True)
special_preperation = models.CharField(max_length=100, blank=True)
days_shoot_required = models.CharField(max_length=100, blank=True)
percentage_location = models.CharField(max_length=100, blank=True)
percentage_scene = models.CharField(max_length=100, blank=True)
major_prosthetic = models.CharField(max_length=100, blank=True)
during_production = models.CharField(max_length=100, blank=True)
# Dream cast $ locations
dream_cast_locations = models.BooleanField(default=False)
leadcharacter = models.CharField(max_length=100, blank=True)
proposedactor1 = models.CharField(max_length=100, blank=True)
upload_image1 = models.FileField(upload_to="profile_pic/", blank=True, null=True)
secondleadcharacter = models.CharField(max_length=100, blank=True)
proposedactor2 = models.CharField(max_length=100, blank=True)
upload_image2 = models.FileField(upload_to="profile_pic/", blank=True, null=True)
mainvillan = models.CharField(max_length=100, blank=True)
proposedactor3 = models.CharField(max_length=100, blank=True)
upload_image3 = models.FileField(upload_to="profile_pic/", blank=True, null=True)
associatecharacter = models.CharField(max_length=100, blank=True)
proposedactor4 = models.CharField(max_length=100, blank=True)
upload_image4 = models.FileField(upload_to="profile_pic/", blank=True, null=True)
associatevillan = models.CharField(max_length=100, blank=True)
proposedactor5 = models.CharField(max_length=100, blank=True)
upload_image5 = models.FileField(upload_to="profile_pic/", blank=True, null=True)
firstlocation = models.CharField(max_length=100, blank=True)
proposedactor6 = models.CharField(max_length=100, blank=True)
upload_image6 = models.FileField(upload_to="profile_pic/", blank=True, null=True)
secondlocation = models.CharField(max_length=100, blank=True)
proposedactor7 = models.CharField(max_length=100, blank=True)
upload_image7 = models.FileField(upload_to="profile_pic/", blank=True, null=True)
thirdlocation = models.CharField(max_length=100, blank=True)
proposedactor8 = models.CharField(max_length=100, blank=True)
upload_image8 = models.FileField(upload_to="profile_pic/", blank=True, null=True)
# About Film budget
film_budget = models.BooleanField(default=False)
making_expenses = models.CharField(max_length=100, blank=True)
percentage_scenes_required = models.CharField(max_length=100, blank=True)
vfx_expenses = models.CharField(max_length=100, blank=True)
approx_budget_required = models.CharField(max_length=100, blank=True)
# Strengths & Expectations
strengths_and_expectation = models.BooleanField(default=False)
script_succed = models.CharField(max_length=100, blank=True)
produced_now = models.CharField(max_length=100, blank=True)
monetary_non_monetary_expectation = models.CharField(max_length=100, blank=True)
class NarrationFeedbackDB(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
Rate_Narration_Service_Experience = models.CharField(
max_length=100, choices=RATING_CHOICES, default="4.5"
)
Rate_Conveying_Of_Plot_Of_Narration = models.CharField(
max_length=100, choices=RATING_CHOICES, default="4.5"
)
Rate_Context_Of_Narration = models.CharField(
max_length=100, choices=RATING_CHOICES, default="4.5"
)
Rate_Pitch_Of_Narration = models.CharField(
max_length=100, choices=RATING_CHOICES, default="4.5"
)
Rate_Conveying_Of_Emotion = models.CharField(
max_length=100, choices=RATING_CHOICES, default="4.5"
)
Voice_That_Need_Attention = models.CharField(max_length=100, default="")
Errors_Faced_In_Narration = models.CharField(max_length=100, default="")
Other_Area_Of_Improvement_Narration = models.CharField(max_length=100, default="")
date_at = models.DateTimeField(auto_now=True)
Email = models.CharField(max_length=100, null=True, default="")
class ConversionFeedbackDB(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
Rate_Conversion_Service_Experience = models.CharField(
max_length=100, null=True, choices=RATING_CHOICES, default="4.5"
)
Rate_Conveying_Of_Plot_Of_Conversion = models.CharField(
max_length=100, null=True, choices=RATING_CHOICES, default="4.5"
)
Rate_Context_Of_Conversion = models.CharField(
max_length=100, null=True, choices=RATING_CHOICES, default="4.5"
)
Rate_Language_Syntax = models.CharField(
max_length=100, null=True, choices=RATING_CHOICES, default="4.5"
)
Language_That_Need_Attention = models.CharField(
max_length=100, null=True, default=""
)
Errors_Faced_In_Conversion = models.CharField(max_length=100, null=True, default="")
Other_Area_Of_Improvement_Conversion = models.CharField(
max_length=100, null=True, default=""
)
date_at = models.DateTimeField(auto_now=True)
Email = models.CharField(max_length=100, null=True, default="")
class Notifications(models.Model):
user_id = models.ForeignKey(User, on_delete=models.CASCADE)
date_at = models.DateTimeField(auto_now=True)
notification = models.CharField(max_length=100, null=True, default="")
class SampleScript(models.Model):
user_id = models.ForeignKey(User, on_delete=models.CASCADE)
date_at = models.DateTimeField(auto_now=True)
script_id = models.CharField(max_length=100, blank=True)
script_title = models.CharField(max_length=100, blank=True)
author_name = models.CharField(max_length=100, blank=True)
actionline_language = models.CharField(max_length=100, blank=True)
actionline_script_language = models.CharField(max_length=100, blank=True)
dialogues_language = models.CharField(max_length=100, blank=True)
dialogues_script_language = models.CharField(max_length=100, blank=True)
script_file_path = models.CharField(default="", max_length=100)
script_file_path_pdf = models.CharField(default="", max_length=100)
dial_src_language = models.CharField(max_length=100, blank=True)
dial_src_script = models.CharField(max_length=100, blank=True)
nondial_src_script = models.CharField(max_length=100, blank=True)
nondial_src_language = models.CharField(max_length=100, blank=True)
languages = models.CharField(max_length=100, blank=True, default="")
status = models.CharField(max_length=100, blank=True, default="")
def __str__(self):
return self.script_id
# class MNFLPPDDatabase(models.Model):
# user_id = models.ForeignKey(User, on_delete=models.CASCADE)
# date_at = models.DateTimeField(auto_now=True)
# country= models.CharField(max_length=100, blank=True)
# province = models.CharField(max_length=100, blank=True)
# city = models.CharField(max_length=100, blank=True)
# contact = models.CharField(max_length=100, blank=True)
# countryCode = models.CharField(max_length=100, blank=True)
# motherTongue = models.CharField(max_length=100, blank=True)
# fathersMotherTongue = models.CharField(max_length=100, blank=True)
# mothersMotherTongue = models.CharField(max_length=100, blank=True)
# firstLanguage = models.CharField(max_length=225)
# firstLangReason = models.CharField(max_length=100, blank=True)
# firstLangMedium = models.CharField(max_length=100, blank=True)
# secondLanguage = models.CharField(max_length=225)
# secondLangReason = models.CharField(max_length=100, blank=True)
# secondLangMedium = models.CharField(max_length=100, blank=True)
# firstLangDegree = models.CharField(max_length=100, blank=True)
# firstLangAwardedBy = models.CharField(max_length=100, blank=True)
# secondLangDegree = models.CharField(max_length=100, blank=True)
# secondLangAwardedBy = models.CharField(max_length=100, blank=True)
# firstLangDegreeFile= models.FileField(upload_to='folder/')
# secondLangDegreeFile= models.FileField(upload_to='folder/')
# isCertificationL1L2 = models.CharField(max_length=100, blank=True)
# certificationL1L2 = models.CharField(max_length=100, blank=True)
# certttificationAwardedByL1L2 = models.CharField(max_length=100, blank=True)
# durationCertificationL1L2 = models.CharField(max_length=100, blank=True)
# modeCertificationL1L2 = models.CharField(max_length=100, blank=True)
# certificationFile= models.FileField(upload_to='folder/')
# certificationL1L2B = models.CharField(max_length=100, blank=True)
# certttificationAwardedByL1L2B = models.CharField(max_length=100, blank=True)
# durationCertificationL1L2B = models.CharField(max_length=100, blank=True)
# modeCertificationL1L2B = models.CharField(max_length=100, blank=True)
# certificationFileB= models.FileField(upload_to='folder/')
# expFirstLang = models.CharField(max_length=100, blank=True)
# expSecondLang = models.CharField(max_length=100, blank=True)
# scriptWrittenFirstLang = models.CharField(max_length=100, blank=True)
# scriptWrittenSecondLang = models.CharField(max_length=100, blank=True)
# scriptWrittenFirstLangFile= models.FileField(upload_to='folder/')
# scriptWrittenSecondLangFile= models.FileField(upload_to='folder/')
# scriptWrittenFirstLangLink = models.CharField(max_length=1000, blank=True)
# scriptWrittenSecondLangLink = models.CharField(max_length=1000, blank=True)
# noScriptTransFromL1toL2 = models.CharField(max_length=100, blank=True)
# noScriptTransFromL1toL2Link = models.CharField(max_length=1000, blank=True)
# noScriptTransFromL2toL1= models.CharField(max_length=100, blank=True)
# noScriptTransFromL2toL1Link = models.CharField(max_length=1000, blank=True)
# noArticleTransFromL1toL2 = models.CharField(max_length=100, blank=True)
# noArticleTransFromL1toL2Link = models.CharField(max_length=1000, blank=True)
# noArticleTransFromL2toL1= models.CharField(max_length=100, blank=True)
# noArticleTransFromL2toL1Link = models.CharField(max_length=1000, blank=True)
# status = models.CharField(max_length=1000, blank=True)
# score = models.IntegerField(default= 0)
"""
class lpptaskDatabase(models.Model):
user_id = models.ForeignKey(User, on_delete=models.CASCADE)
date_at = models.DateTimeField(auto_now=True)
country= models.CharField(max_length=100, blank=True)
"""
class DisplayScripts(models.Model):
name = models.CharField(max_length=100, null=True, default="")
phone = models.CharField(max_length=100, null=True, default="")
file_name = models.FileField(upload_to="scripts/")
check_f = models.BooleanField(default=False)
check_d = models.BooleanField(default=False)
check_v = models.BooleanField(default=False)
class Contact(models.Model):
date_at = models.DateTimeField(auto_now=True)
name = models.CharField(max_length=100, null=True, default="")
email = models.CharField(max_length=100, null=True, default="")
enquiry = models.CharField(max_length=10000, null=True, default="")
class Careers(models.Model):
date_at = models.DateTimeField(auto_now=True)
firstname = models.CharField(max_length=100, null=True, default="")
lastname = models.CharField(max_length=100, null=True, default="")
email = models.CharField(max_length=100, null=True, default="")
location = models.CharField(max_length=10000, null=True, default="")
contact = models.CharField(max_length=100, null=True, default="")
profileLinkedin = models.CharField(max_length=100, null=True, default="")
portfolioLink = models.CharField(max_length=100, null=True, default="")
ExtraInfo = models.CharField(max_length=10000, null=True, default="")
resume = models.FileField(upload_to="resumes/")
class Collaborator(models.Model):
dateOfReg = models.DateTimeField(auto_now=True)
Email = models.CharField(max_length=100, blank=True)
message = models.CharField(max_length=1000, blank=True)
phone = models.CharField(max_length=100, blank=True)
name = models.CharField(max_length=100, blank=True)
checke = models.BooleanField(default=False)
class PageCounterData(models.Model):
pageview = models.IntegerField(default=0)
event_pageview = models.IntegerField(default=0)
newuser_count = models.IntegerField(default=0)
olduser_count = models.IntegerField(default=0)
class DaywisePageDatas(models.Model):
Day_id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
pageview = models.IntegerField(default=0)
event_pageview = models.IntegerField(default=0)
newuser_count = models.IntegerField(default=0)
olduser_count = models.IntegerField(default=0)
date_count = models.DateTimeField(blank=True)
SERVICE_CHOICES = [
("Membership-Monthly", "Membership-Monthly"),
("Membership-Annual", "Membership-Annual"),
("Membership- Life", "Membership- Life"),
("Conversion", "Conversion"),
("Narration-LineBYLine", "Narration-LineBYLine"),
("Narration-Subtitling", "Narration-Subtitling"),
("Gift", "Gift"),
]
PAYMENT_METHOD = [
("card", "card"),
("UPI", "UPI"),
("netbanking", "netbanking"),
("wallet", "wallet"),
]
PAYMENT_RESULT = [("pass", "pass"), ("fail", "fail")]
GATEWAY = [("razorPay", "reazorPay"), ("Stripe", "Stripe")]
class PaymentData(models.Model):
uuid = models.UUIDField(
max_length=36, primary_key=True, default=uuid.uuid4, editable=False
)
date = models.DateField(auto_now=True)
payment_id = models.CharField(max_length=64)
user_id = models.ForeignKey(User, on_delete=models.CASCADE)
services_used = models.CharField(
null=True, blank=True, choices=SERVICE_CHOICES, max_length=30
)
script_info = models.ForeignKey(MNFScriptDatabase, on_delete=models.CASCADE)
number_of_pages = models.IntegerField(null=True, blank=True)
total_amount = models.FloatField(null=True, blank=True)
discount = models.FloatField(null=True, blank=True)
amount_charged = models.FloatField(null=True, blank=True)
gateway_fee = models.FloatField(null=True, blank=True)
currency = models.CharField(default="INR", max_length=30)
pay_method = models.CharField(
null=True, blank=True, choices=PAYMENT_METHOD, max_length=12
)
payment_status = models.CharField(
null=True, blank=True, choices=PAYMENT_RESULT, max_length=5
)
payment_gateway = models.CharField(
null=True, blank=True, choices=GATEWAY, max_length=10
)
def __str__(self):
return self.user_id