fixes in data-model for data-import

This commit is contained in:
Michael Hoennig 2024-01-23 10:32:07 +01:00
parent 13ddaa2afd
commit 5d9a075d4d
5 changed files with 9 additions and 6 deletions

View File

@ -66,7 +66,7 @@ classDiagram
+Numeric partnerNumber: 12345
+Role partnerRole
}
partner-MeierGmbH o-- role-MeierGmbH
partner-MeierGmbH *-- role-MeierGmbH
class person-MeierGmbH {
+personType: LEGAL

View File

@ -1,3 +1,4 @@
package net.hostsharing.hsadminng.hs.office.coopassets;
import lombok.*;
@ -14,6 +15,7 @@ import java.text.DecimalFormat;
import java.time.LocalDate;
import java.util.UUID;
import static java.util.Optional.ofNullable;
import static net.hostsharing.hsadminng.stringify.Stringify.stringify;
@Entity
@ -27,7 +29,7 @@ import static net.hostsharing.hsadminng.stringify.Stringify.stringify;
public class HsOfficeCoopAssetsTransactionEntity implements Stringifyable, HasUuid {
private static Stringify<HsOfficeCoopAssetsTransactionEntity> stringify = stringify(HsOfficeCoopAssetsTransactionEntity.class)
.withProp(e -> e.getMembership().getMemberNumber())
.withProp(e -> ofNullable(e.getMembership()).map(HsOfficeMembershipEntity::getMemberNumber).orElse(null))
.withProp(HsOfficeCoopAssetsTransactionEntity::getValueDate)
.withProp(HsOfficeCoopAssetsTransactionEntity::getTransactionType)
.withProp(HsOfficeCoopAssetsTransactionEntity::getAssetValue)
@ -55,7 +57,7 @@ public class HsOfficeCoopAssetsTransactionEntity implements Stringifyable, HasUu
private BigDecimal assetValue;
@Column(name = "reference")
private String reference;
private String reference; // TODO: what is this for?
@Column(name = "comment")
private String comment;

View File

@ -51,7 +51,7 @@ public class HsOfficeCoopSharesTransactionEntity implements Stringifyable, HasUu
private int shareCount;
@Column(name = "reference")
private String reference;
private String reference; // TODO: what is this for?
@Column(name = "comment")
private String comment;

View File

@ -6,7 +6,7 @@
create table hs_office_bankaccount
(
uuid uuid unique references RbacObject (uuid) initially deferred,
holder varchar(27) not null,
holder varchar(64) not null,
iban varchar(34) not null,
bic varchar(11) not null
);

View File

@ -10,7 +10,8 @@ CREATE TYPE HsOfficeCoopAssetsTransactionType AS ENUM ('ADJUSTMENT',
'TRANSFER',
'ADOPTION',
'CLEARING',
'LOSS');
'LOSS',
'LIMITATION');
CREATE CAST (character varying as HsOfficeCoopAssetsTransactionType) WITH INOUT AS IMPLICIT;