Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.

Commit

Permalink
1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfliegner committed May 18, 2023
1 parent cc8d9a7 commit 2f74e86
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LifeInsuranceDataModel"
uuid = "4892898e-25d7-46ce-b5c3-dea2164303ac"
authors = ["Michael Fliegner <michael.fliegner@hamburg.de>"]
version = "1.3.2"
version = "1.4.0"

[deps]
BitemporalPostgres = "e513cd14-23e6-48df-acf1-d9bc8fa5674b"
Expand Down
17 changes: 0 additions & 17 deletions scrap.jl

This file was deleted.

1 change: 1 addition & 0 deletions src/DDL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ function up()
column(:ref_validfrom, :bigint, "REFERENCES versions(id) ON DELETE CASCADE")
column(:ref_invalidfrom, :bigint, "DEFAULT 2^53 - 1 REFERENCES versions(id) ON DELETE SET DEFAULT")
column(:ref_valid, :int8range)
column(:interface_id, :bigint)
column(:description, :string)
]
end
Expand Down
1 change: 1 addition & 0 deletions src/InsuranceProducts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Procuct_Revision
ref_component::DbId = InfinityKey
ref_validfrom::DbId = InfinityKey
ref_invalidfrom::DbId = InfinityKey
interface_id::Integer = 0
description::String = ""
end

Expand Down
13 changes: 12 additions & 1 deletion src/LifeInsuranceDataModel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export persistModelStateContract,
psection,
ProductItem,
ProductItemRevision,
ProductItemProductReference,
TariffItemRole,
TariffItem,
TariffItemRevision,
Expand Down Expand Up @@ -110,6 +111,14 @@ is a section (see above) of a Product entity
parts::Vector{ProductPartSection} = []
end

"""
ProductItemProductReference is a reference from a ProductItem to a product entity
"""
@kwdef mutable struct ProductItemProductReference
rev::ProductItemRevision = ProductItemRevision()
ref::ProductSection = ProductSection()
end

"""
TariffItemPartnerReference is a reference from a TariffItem to a Partner entity
For instance, typically an insured person
Expand Down Expand Up @@ -141,6 +150,7 @@ end
ProductItemSection is a section (see above) of a ProductItem component
"""
@kwdef mutable struct ProductItemSection
product_ref::ProductSection = ProductSection()
revision::ProductItemRevision = ProductItemRevision()
tariff_items::Vector{TariffItemSection} = []
end
Expand Down Expand Up @@ -226,7 +236,8 @@ function pisection(history_id::Integer, version_id::Integer, tsdb_validfrom, tsw
end
end

ProductItemSection(revision=pir, tariff_items=pitrs)
prs = prsection(pir.ref_product.value, tsdb_validfrom, tsworld_validfrom, 0)
ProductItemSection(revision=pir, tariff_items=pitrs, product_ref=prs)
end
end
end,
Expand Down
6 changes: 3 additions & 3 deletions testCreateContract.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ LifeInsuranceDataModel.load_model()
# Create Product

p = Product()
pr = ProductRevision(description="Life Risk")
pr = ProductRevision(interface_id=1, description="Life Risk")

pp = ProductPart()
ppr = ProductPartRevision(
Expand Down Expand Up @@ -130,7 +130,7 @@ LifeInsuranceDataModel.load_model()
println(LifeRiskProduct)

p = Product()
pr = ProductRevision(description="Two Life Risk")
pr = ProductRevision(interface_id=2, description="Two Life Risk")

pp = ProductPart()
ppr = ProductPartRevision(
Expand Down Expand Up @@ -161,7 +161,7 @@ LifeInsuranceDataModel.load_model()


p = Product()
pr = ProductRevision(description="Life Risk - Terminal Illness")
pr = ProductRevision(interface_id=3, description="Life Risk - Terminal Illness")

pp = ProductPart()
ppr = ProductPartRevision(
Expand Down
2 changes: 1 addition & 1 deletion testLoadHistory.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ ENV["SEARCHLIGHT_PASSWORD"] = "postgres"
#
#println(pwd())
# ZonedDateTime(Date("2025-12-01"), tz"UTC")
csection(2, now(tz"UTC"), MaxDate - Day(1), 0)
csection(1, now(tz"UTC"), MaxDate - Day(1), 0)

2 comments on commit 2f74e86

@michaelfliegner
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/83902

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.4.0 -m "<description of version>" 2f74e86807a856616abb4c0d6f68b07a4d6b269c
git push origin v1.4.0

Please sign in to comment.