from peewee import CompositeKey, DateTimeField, FloatField, IntegerField, Model


class Oncala10Mindata(Model):
    aero_id = IntegerField()
    count_consumedpower = FloatField(null=True)
    count_consumedreactivepow = FloatField(null=True)
    count_engagementsbypasscont = IntegerField(null=True)
    count_engagementscomp1 = IntegerField(null=True)
    count_engagementscomp10 = IntegerField(null=True)
    count_engagementscomp2 = IntegerField(null=True)
    count_engagementscomp3 = IntegerField(null=True)
    count_engagementscomp4 = IntegerField(null=True)
    count_engagementscomp5 = IntegerField(null=True)
    count_engagementscomp6 = IntegerField(null=True)
    count_engagementscomp7 = IntegerField(null=True)
    count_engagementscomp8 = IntegerField(null=True)
    count_engagementscomp9 = IntegerField(null=True)
    count_engagementsg1_g2 = IntegerField(null=True)
    count_engagementsg1cont = IntegerField(null=True)
    count_engagementsg2_g1 = IntegerField(null=True)
    count_engagementsg2cont = IntegerField(null=True)
    count_engagementsgearheat = IntegerField(null=True)
    count_engagementsgearoilcooler = IntegerField(null=True)
    count_engagementsgearoilpump = IntegerField(null=True)
    count_engagementsgreasepump = IntegerField(null=True)
    count_engagementsheat1 = IntegerField(null=True)
    count_engagementsheat2 = IntegerField(null=True)
    count_engagementsheattopset = IntegerField(null=True)
    count_engagementshypumpcal = IntegerField(null=True)
    count_engagementshypumptips = IntegerField(null=True)
    count_engagementsnacellefan = IntegerField(null=True)
    count_engagementsthyristor = IntegerField(null=True)
    count_engagementsthyristorfan = IntegerField(null=True)
    count_engagementsyawccw = IntegerField(null=True)
    count_engagementsyawcw = IntegerField(null=True)
    count_hoursengagedcomp1 = FloatField(null=True)
    count_hoursengagedcomp10 = FloatField(null=True)
    count_hoursengagedcomp2 = FloatField(null=True)
    count_hoursengagedcomp3 = FloatField(null=True)
    count_hoursengagedcomp4 = FloatField(null=True)
    count_hoursengagedcomp5 = FloatField(null=True)
    count_hoursengagedcomp6 = FloatField(null=True)
    count_hoursengagedcomp7 = FloatField(null=True)
    count_hoursengagedcomp8 = FloatField(null=True)
    count_hoursengagedcomp9 = FloatField(null=True)
    count_producedpower = FloatField(null=True)
    count_producedpowergen1 = FloatField(null=True)
    count_producedpowergen2 = FloatField(null=True)
    count_t1 = FloatField(null=True)
    count_t2 = FloatField(null=True)
    count_t3 = FloatField(null=True)
    count_timeconnectedtogrid = FloatField(null=True)
    count_timeengagedbypasscont = FloatField(null=True)
    count_timeengagedg1cont = FloatField(null=True)
    count_timeengagedg2cont = FloatField(null=True)
    count_timeengagedgearoilcooler = FloatField(null=True)
    count_timeengagedgearoilheat = FloatField(null=True)
    count_timeengagedgearoilpump = FloatField(null=True)
    count_timeengagedgen1 = FloatField(null=True)
    count_timeengagedgen2 = FloatField(null=True)
    count_timeengagedgreasepump = FloatField(null=True)
    count_timeengagedheat1 = FloatField(null=True)
    count_timeengagedheat2 = FloatField(null=True)
    count_timeengagedheattopset = FloatField(null=True)
    count_timeengagedhypumpcal = FloatField(null=True)
    count_timeengagedhypumptips = FloatField(null=True)
    count_timeengagednacellefan = FloatField(null=True)
    count_timeengagedthyristor = FloatField(null=True)
    count_timeengagedthyristorfan = FloatField(null=True)
    count_timeengagedyawccw = FloatField(null=True)
    count_timeengagedyawcw = FloatField(null=True)
    count_timeinservice = FloatField(null=True)
    count_timeongrid = FloatField(null=True)
    count_timepoweron = IntegerField(null=True)
    count_timeready = FloatField(null=True)
    count_timewitherror = FloatField(null=True)
    count_timewithwarning = FloatField(null=True)
    countsecondsbrakereleased = IntegerField(null=True)
    countsecondseventcodenotzero = IntegerField(null=True)
    countsecondsgeneratorcutin = IntegerField(null=True)
    grid_avg_activepower = FloatField(null=True)
    grid_avg_currentl1 = IntegerField(null=True)
    grid_avg_currentl2 = IntegerField(null=True)
    grid_avg_currentl3 = IntegerField(null=True)
    grid_avg_freqency = FloatField(null=True)
    grid_avg_reactivepower = FloatField(null=True)
    grid_avg_voltagel1 = IntegerField(null=True)
    grid_avg_voltagel2 = IntegerField(null=True)
    grid_avg_voltagel3 = IntegerField(null=True)
    grid_max_activepower = FloatField(null=True)
    grid_max_currentl1 = IntegerField(null=True)
    grid_max_currentl2 = IntegerField(null=True)
    grid_max_currentl3 = IntegerField(null=True)
    grid_max_freqency = FloatField(null=True)
    grid_max_reactivepower = FloatField(null=True)
    grid_max_voltagel1 = IntegerField(null=True)
    grid_max_voltagel2 = IntegerField(null=True)
    grid_max_voltagel3 = IntegerField(null=True)
    grid_min_activepower = FloatField(null=True)
    grid_min_currentl1 = IntegerField(null=True)
    grid_min_currentl2 = IntegerField(null=True)
    grid_min_currentl3 = IntegerField(null=True)
    grid_min_freqency = FloatField(null=True)
    grid_min_reactivepower = FloatField(null=True)
    grid_min_voltagel1 = IntegerField(null=True)
    grid_min_voltagel2 = IntegerField(null=True)
    grid_min_voltagel3 = IntegerField(null=True)
    grid_var_activepower = FloatField(null=True)
    grid_var_currentl1 = IntegerField(null=True)
    grid_var_currentl2 = IntegerField(null=True)
    grid_var_currentl3 = IntegerField(null=True)
    grid_var_freqency = FloatField(null=True)
    grid_var_reactivepower = FloatField(null=True)
    grid_var_voltagel1 = IntegerField(null=True)
    grid_var_voltagel2 = IntegerField(null=True)
    grid_var_voltagel3 = IntegerField(null=True)
    id = IntegerField(null=True)
    pctimestamp = DateTimeField()
    ppmtimestamp = DateTimeField(null=True)
    status_avg_generatorrpm = IntegerField(null=True)
    status_avg_hydpresscaliber = IntegerField(null=True)
    status_avg_hydpresswingtips = IntegerField(null=True)
    status_avg_nacellepos = IntegerField(null=True)
    status_avg_rotorrpm = FloatField(null=True)
    status_avg_windspeed = FloatField(null=True)
    status_errorcode = IntegerField(null=True)
    status_generatoronnet = IntegerField(null=True)
    status_max_generatorrpm = IntegerField(null=True)
    status_max_hydpresscaliber = IntegerField(null=True)
    status_max_hydpresswingtips = IntegerField(null=True)
    status_max_nacellepos = IntegerField(null=True)
    status_max_rotorrpm = FloatField(null=True)
    status_max_windspeed = FloatField(null=True)
    status_min_generatorrpm = IntegerField(null=True)
    status_min_hydpresscaliber = IntegerField(null=True)
    status_min_hydpresswingtips = IntegerField(null=True)
    status_min_nacellepos = IntegerField(null=True)
    status_min_rotorrpm = FloatField(null=True)
    status_min_windspeed = FloatField(null=True)
    status_var_generatorrpm = IntegerField(null=True)
    status_var_hydpresscaliber = IntegerField(null=True)
    status_var_hydpresswingtips = IntegerField(null=True)
    status_var_nacellepos = IntegerField(null=True)
    status_var_rotorrpm = FloatField(null=True)
    status_var_windspeed = FloatField(null=True)
    temp_avg_ambient = IntegerField(null=True)
    temp_avg_gearbearing1 = IntegerField(null=True)
    temp_avg_gearbearing2 = IntegerField(null=True)
    temp_avg_gearoil = IntegerField(null=True)
    temp_avg_generator1 = IntegerField(null=True)
    temp_avg_generator2 = IntegerField(null=True)
    temp_avg_mainpanel = IntegerField(null=True)
    temp_avg_nacelle = IntegerField(null=True)
    temp_avg_thyristor = IntegerField(null=True)
    temp_max_ambient = IntegerField(null=True)
    temp_max_gearbearing1 = IntegerField(null=True)
    temp_max_gearbearing2 = IntegerField(null=True)
    temp_max_gearoil = IntegerField(null=True)
    temp_max_generator1 = IntegerField(null=True)
    temp_max_generator2 = IntegerField(null=True)
    temp_max_mainpanel = IntegerField(null=True)
    temp_max_nacelle = IntegerField(null=True)
    temp_max_thyristor = IntegerField(null=True)
    temp_min_ambient = IntegerField(null=True)
    temp_min_gearbearing1 = IntegerField(null=True)
    temp_min_gearbearing2 = IntegerField(null=True)
    temp_min_gearoil = IntegerField(null=True)
    temp_min_generator1 = IntegerField(null=True)
    temp_min_generator2 = IntegerField(null=True)
    temp_min_mainpanel = IntegerField(null=True)
    temp_min_nacelle = IntegerField(null=True)
    temp_min_thyristor = IntegerField(null=True)
    temp_var_ambient = IntegerField(null=True)
    temp_var_gearbearing1 = IntegerField(null=True)
    temp_var_gearbearing2 = IntegerField(null=True)
    temp_var_gearoil = IntegerField(null=True)
    temp_var_generator1 = IntegerField(null=True)
    temp_var_generator2 = IntegerField(null=True)
    temp_var_mainpanel = IntegerField(null=True)
    temp_var_nacelle = IntegerField(null=True)
    temp_var_thyristor = IntegerField(null=True)
    ttimestamp = DateTimeField(null=True)

    class Meta:
        table_name = "oncala_10mindata"
        indexes = ((("aero_id", "pctimestamp"), True),)
        primary_key = CompositeKey("aero_id", "pctimestamp")
