Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.1 #1

Merged
merged 14 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Pull Request
on:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install web dependencies
run: |
cd web
npm ci
- name: Lint
run: |
cd web
npm run lint
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: mysecretpassword
POSTGRES_DB: immowealth
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: Build with Gradle
run: ./gradlew build -Dquarkus.package.type=uber-jar
- name: Start application
run: |
nohup ./gradlew --console=plain quarkusDev &
for attempt in {1..20}; do sleep 1; if curl http://localhost:8080/; then echo ready; break; fi; echo waiting...; done
- name: Generate schema
run: curl http://localhost:8080/graphql/schema.graphql >> web/schema.graphql
- name: Update schema
run: |
echo "scalar Date" >> web/schema.graphql
echo "scalar BigInteger" >> web/schema.graphql
echo "scalar DateTime" >> web/schema.graphql
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 20
- name: Build web
run: |
cd web
npm ci
npm run compile
npm run build
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ docker-compose up -d

There are many new features planned. You can find a little roadmap of planned future releases here:

### v1.1.0
- [ ] Add extra information to objects
- [ ] More entities should be editable
- [ ] Update geo location by hand
- [ ] Split large numbers with dots
- [ ] Add credit rate note
- [ ] Migrate all tables to MUI datagrid

### v1.2.0
- [ ] Add translations
- [ ] Add different currencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ data class CreditRateInput @JsonbCreator constructor(
/**
* The date of the booking
*/
val date: Date
val date: Date,
/**
* The note of the booking
*/
val note: String?
)
47 changes: 46 additions & 1 deletion src/main/kotlin/de/mathisburger/data/input/RealEstateInput.kt
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,50 @@ data class RealEstateInput @JsonbCreator constructor(
* Date the real estate was bought
*/
@AdaptToScalar(Scalar.Date::class)
val dateBought: Date
val dateBought: Date,
/**
* Amount of rooms
*/
val rooms: Double,
/**
* Space for living
*/
val space: Double,
/**
* Type of the object
* e.g. house or flat (1. OG, EG)
*/
val objectType: String,
/**
* Construction year
*/
val constructionYear: Int,
/**
* Renovation year
*/
val renovationYear: Int?,
/**
* Energy efficiency class
*/
val energyEfficiency: String?,
/**
* Gross return of the object investment
*/
val grossReturn: Double?,
/**
* Garden exists
*/
val garden: Boolean,
/**
* Kitchen exists
*/
val kitchen: Boolean,
/**
* Heating type (wood, oil, gas)
*/
val heatingType: String,
/**
* Notes
*/
val notes: String?
)
29 changes: 29 additions & 0 deletions src/main/kotlin/de/mathisburger/data/input/UpdateCreditInput.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package de.mathisburger.data.input

import jakarta.json.bind.annotation.JsonbCreator

/**
* The update credit input for creating credits
*/
data class UpdateCreditInput @JsonbCreator constructor(
/**
* The ID of the credit that should be updated
*/
var id: Long,
/**
* The credit amount
*/
val amount: Long?,
/**
* The interest rate
*/
val interestRate: Double?,
/**
* The redemption rate
*/
val redemptionRate: Double?,
/**
* The credit bank
*/
val bank: String?
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package de.mathisburger.data.input

import jakarta.json.bind.annotation.JsonbCreator

/**
* Update house prices input
*/
data class UpdateHousePriceChangeInput @JsonbCreator constructor(
/**
* The ID of the entity
*/
val id: Long,
/**
* The zip
*/
val zip: String?,
/**
* The year
*/
val year: Int?,
/**
* The change
*/
val change: Double?,
)
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,58 @@ data class UpdateRealEstateInput @JsonbCreator constructor(
* Date the real estate was bought
*/
@AdaptToScalar(Scalar.Date::class)
val dateBought: Date?
val dateBought: Date?,
/**
* Position lat
*/
val positionLat: Double?,
/**
* Position lon
*/
val positionLon: Double?,
/**
* Amount of rooms
*/
val rooms: Double?,
/**
* Space for living
*/
val space: Double?,
/**
* Type of the object
* e.g. house or flat (1. OG, EG)
*/
val objectType: String?,
/**
* Construction year
*/
val constructionYear: Int?,
/**
* Renovation year
*/
val renovationYear: Int?,
/**
* Energy efficiency class
*/
val energyEfficiency: String?,
/**
* Gross return of the object investment
*/
val grossReturn: Double?,
/**
* Garden exists
*/
val garden: Boolean?,
/**
* Kitchen exists
*/
val kitchen: Boolean?,
/**
* Heating type (wood, oil, gas)
*/
val heatingType: String?,
/**
* General notes
*/
val notes: String?
)
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,9 @@ data class CreditResponse @JsonbCreator constructor(
/**
* The credit rate accumulation steps
*/
val creditRateCummulationSteps: List<Double>
val creditRateCummulationSteps: List<Double>,
/**
* Linked real estate object id
*/
val realEstateObjectId: Long
);
22 changes: 22 additions & 0 deletions src/main/kotlin/de/mathisburger/data/response/MapResponse.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package de.mathisburger.data.response

import de.mathisburger.entity.RealEstateObject
import jakarta.json.bind.annotation.JsonbCreator

/**
* Map response
*/
data class MapResponse @JsonbCreator constructor(
/**
* All objects that should be shown on map
*/
val objects: List<RealEstateObject>,
/**
* Middle lat of the map
*/
val lat: Double,
/**
* Middle lon of the map
*/
val lon: Double
)
1 change: 1 addition & 0 deletions src/main/kotlin/de/mathisburger/entity/Credit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import jakarta.persistence.Entity
import jakarta.persistence.GeneratedValue
import jakarta.persistence.Id
import jakarta.persistence.OneToMany
import jakarta.persistence.OneToOne
import java.util.Date

/**
Expand Down
5 changes: 5 additions & 0 deletions src/main/kotlin/de/mathisburger/entity/CreditRate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,9 @@ class CreditRate {
* The amount of money
*/
var amount: Double? = null;

/**
* The note of the credit rate
*/
var note: String? = null;
}
58 changes: 57 additions & 1 deletion src/main/kotlin/de/mathisburger/entity/RealEstateObject.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,65 @@ class RealEstateObject {
*/
var positionLon: Double? = null

/**
* Amount of rooms
*/
var rooms: Double? = null

/**
* Space for living
*/
var space: Double? = null

/**
* Type of the object
* e.g. house or flat (1. OG, EG)
*/
var objectType: String? = null

/**
* Construction year
*/
var constructionYear: Int? = null

/**
* Renovation year
*/
var renovationYear: Int? = null

/**
* Energy efficiency class
*/
var energyEfficiency: String? = null

/**
* Gross return of the object investment
*/
var grossReturn: Double? = null

/**
* Garden exists
*/
var garden: Boolean? = null

/**
* Kitchen exists
*/
var kitchen: Boolean? = null

/**
* Heating type (wood, oil, gas)
*/
var heatingType: String? = null

/**
* All multiline notes of the
*/
var notes: String? = null;

/**
* The linked credit
*/
@OneToOne
@OneToOne(cascade = [CascadeType.ALL])
var credit: Credit? = null
}
Loading
Loading