Hierarchical anova: how to calculate degrees of freedom

I would like to calculate degrees of freedom for two hierarchical anovas (below).

48 genotypes were subjected to 4 temperature treatments. In each treatment, there were 3 replicates per genotype, which amounted to 144 subjects per treatment and a grand total of 576 subjects in the experiment. Within each treatment, subjects were randomly assigned to experimental Units (24 subjects could fit into each Unit, so there were 6 Units per Treatment, totaling 24 Units in the experiment).

I am most interested in the Treatment * Genotype interaction, but I would also like to account for the random effect of Unit. I see two potential options: the first would model the Treatment * Genotype interaction as fixed, and the second would give each Genotype its own slope and intercept (random slope and intercept model). Both models have Unit in a nested random effects term, with Genotype nested within Unit:

aov(Y ~ Treatment * Genotype + (Genotype / Unit))

aov(Y ~ Treatment + (Treatment | Genotype) + (Genotype / Unit))

I am confused about how to calculate degrees of freedom for these models. Any help would be much appreciated!