This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group 'com.example' | |
version '1.0-SNAPSHOT' | |
apply plugin: 'java' | |
apply plugin: 'application' | |
sourceCompatibility = 1.8 | |
repositories { | |
mavenCentral() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Notice the @Transient annotation on the MultipartFile field. | |
This means that the field value will NOT be persisted to the database. | |
*/ | |
package com.teamtreehouse.giflib.model; | |
import org.springframework.web.multipart.MultipartFile; | |
import javax.persistence.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [pull_request] | |
jobs: | |
create-postgres-image: | |
permissions: | |
contents: read | |
packages: write | |
uses: christherama/create-postgres-image/.github/workflows/workflow.yaml@v0.0.1 | |
with: | |
docker-registry: ghcr.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
status_counts_by_month = ( | |
Task.objects.filter(plan_id=plan_id, metric_type=metric_type, group_by_date__year=effective_year) | |
.annotate( | |
completed_on_time=Case( | |
When(completed_date__isnull=True, then=0), | |
When(completed_date__lte=F("due_date"), then=1), | |
default=0, | |
output_field=IntegerField(), | |
) | |
) |
OlderNewer