from django.db import models
from django.contrib.auth.models import User
from users.models import User_Extended

class Sheet(models.Model):
    #link username to username in User_Extended
    username = models.ForeignKey(User_Extended, to_field = "username", default = None,on_delete=models.CASCADE)
    #(blank = True, null = True) == NULL value allowed
    level = models.PositiveSmallIntegerField(blank = True, null = True)
    strength = models.PositiveSmallIntegerField(blank = True, null = True)
    strength_mod = models.PositiveSmallIntegerField(blank = True, null = True)
    dexterity = models.PositiveSmallIntegerField(blank = True, null = True)
    dexterity_mod = models.PositiveSmallIntegerField(blank = True, null = True)
    constitution = models.PositiveSmallIntegerField(blank = True, null = True)
    constitution_mod = models.PositiveSmallIntegerField(blank = True, null = True)
    intelligence = models.PositiveSmallIntegerField(blank = True, null = True)
    intelligence_mod = models.PositiveSmallIntegerField(blank = True, null = True)
    wisdom = models.PositiveSmallIntegerField(blank = True, null = True)
    wisdom_mod = models.PositiveSmallIntegerField(blank = True, null = True)
    charisma = models.PositiveSmallIntegerField(blank = True, null = True)
    charisma_mod = models.PositiveSmallIntegerField(blank = True, null = True)
    inspiration = models.PositiveSmallIntegerField(blank = True, null = True)
    proficiency = models.PositiveSmallIntegerField(blank = True, null = True)
    sav_strength = models.SmallIntegerField(blank = True, null = True)
    sav_strength_circ = models.BooleanField(default=False)
    sav_dexterity = models.SmallIntegerField(blank = True, null = True)
    sav_dexterity_circ = models.BooleanField(default=False)
    sav_constitution = models.SmallIntegerField(blank = True, null = True)
    sav_constitution_circ = models.BooleanField(default=False)
    sav_intelligence = models.SmallIntegerField(blank = True, null = True)
    sav_intelligence_circ = models.BooleanField(default=False)
    sav_wisdom = models.SmallIntegerField(blank = True, null = True)
    sav_wisdom_circ = models.BooleanField(default=False)
    sav_charisma = models.SmallIntegerField(blank = True, null = True)
    sav_charisma_circ = models.BooleanField(default=False)
    acrobatics = models.SmallIntegerField(blank = True, null = True)
    acrobatics_circ= models.BooleanField(default=False)
    animal_handling = models.SmallIntegerField(blank = True, null = True)
    animal_handling_circ= models.BooleanField(default=False)
    arcana = models.SmallIntegerField(blank = True, null = True)
    arcana_circ= models.BooleanField(default=False)
    athletics = models.SmallIntegerField(blank = True, null = True)
    athletics_circ= models.BooleanField(default=False)
    deception = models.SmallIntegerField(blank = True, null = True)
    deception_circ= models.BooleanField(default=False)
    history = models.SmallIntegerField(blank = True, null = True)
    history_circ= models.BooleanField(default=False)
    insight = models.SmallIntegerField(blank = True, null = True)
    insight_circ= models.BooleanField(default=False)
    intimidation = models.SmallIntegerField(blank = True, null = True)
    intimidation_circ= models.BooleanField(default=False)
    investigation = models.SmallIntegerField(blank = True, null = True)
    investigation_circ= models.BooleanField(default=False)
    medicine = models.SmallIntegerField(blank = True, null = True)
    medicine_circ= models.BooleanField(default=False)
    nature = models.SmallIntegerField(blank = True, null = True)
    nature_circ= models.BooleanField(default=False)
    perception = models.SmallIntegerField(blank = True, null = True)
    perception_circ= models.BooleanField(default=False)
    performance = models.SmallIntegerField(blank = True, null = True)
    performance_circ= models.BooleanField(default=False)
    persuasion = models.SmallIntegerField(blank = True, null = True)
    persuasion_circ= models.BooleanField(default=False)
    religion = models.SmallIntegerField(blank = True, null = True)
    religion_circ= models.BooleanField(default=False)
    sleight_hand = models.SmallIntegerField(blank = True, null = True)
    sleight_hand_circ= models.BooleanField(default=False)
    stealth = models.SmallIntegerField(blank = True, null = True)
    stealth_circ= models.BooleanField(default=False)
    survival = models.SmallIntegerField(blank = True, null = True)
    survival_circ= models.BooleanField(default=False)
    armor_class = models.CharField(max_length = 10, blank = True, null = True)
    initiative = models.SmallIntegerField(blank = True, null = True)
    speed = models.PositiveSmallIntegerField(blank = True, null = True)
    hp_curr = models.PositiveSmallIntegerField(blank = True, null = True)
    hp_temp = models.PositiveSmallIntegerField(blank = True, null = True)
    hit_dice = models.CharField(max_length=10, blank = True, null = True)
    dth_succ = models.PositiveSmallIntegerField(blank = True, null = True)
    dth_fail = models.PositiveSmallIntegerField(blank = True, null = True)
    atk_spell_name_1 = models.CharField(max_length=20, blank = True, null = True)
    atk_spell_bonus_1 = models.PositiveSmallIntegerField(blank = True, null = True)
    atk_spell_type_1 = models.CharField(max_length=10, blank = True, null = True)
    atk_spell_name_2 = models.CharField(max_length=20, blank = True, null = True)
    atk_spell_bonus_2 = models.PositiveSmallIntegerField(blank = True, null = True)
    atk_spell_type_2 = models.CharField(max_length=10, blank = True, null = True)
    atk_spell_name_3 = models.CharField(max_length=20, blank = True, null = True)
    atk_spell_bonus_3 = models.PositiveSmallIntegerField(blank = True, null = True)
    atk_spell_type_3 = models.CharField(max_length=10, blank = True, null = True)
    atk_spell_name_4 = models.CharField(max_length=20, blank = True, null = True)
    atk_spell_bonus_4 = models.PositiveSmallIntegerField(blank = True, null = True)
    atk_spell_type_4 = models.CharField(max_length=10, blank = True, null = True)
    atk_spell_name_5 = models.CharField(max_length=20, blank = True, null = True)
    atk_spell_bonus_5 = models.PositiveSmallIntegerField(blank = True, null = True)
    atk_spell_type_5 = models.CharField(max_length=10, blank = True, null = True)
    pass_wisdom = models.PositiveSmallIntegerField(blank = True, null = True)
    oth_prof_lang = models.CharField(max_length=1000, blank = True, null = True)
    feat_trait = models.CharField(max_length=2000, blank = True, null = True)