""" from api import DB from sqlalchemy import func from werkzeug.security import generate_password_hash, check_password_hash from datetime import date, datetime, time from api.variables import HITS, KIKPOINTS from api.errors import TeamDoesNotExist, PlayerDoesNotExist, GameDoesNotExist,\ InvalidField, LeagueDoesNotExist, SponsorDoesNotExist,\ NonUniqueEmail, PlayerNotOnTeam, PlayerNotSubscribed,\ BadRequestError from api.validators import rbi_validator, hit_validator, inning_validator,\ string_validator, date_validator, time_validator,\ field_validator, year_validator, gender_validator,\ float_validator, boolean_validator roster = DB.Table( 'roster', DB.Column('player_id', DB.Integer, DB.ForeignKey('player.id')), DB.Column('team_id', DB.Integer, DB.ForeignKey('team.id'))) SUBSCRIBED = "{} SUBSCRIBED" AWARD_POINTS = "{} awarded espy points for subscribing: {}" class Fun(DB.Model): """ A class used to store the amount of fun had by all. Columns: id: the unique id year: the year the fun count is for count: the total count for the year """ id = DB.Column(DB.Integer, primary_key=True) year = DB.Column(DB.Integer)