hs.hsadmin.ng/src/main/jdl/customer.jdl

91 lines
2.2 KiB
Plaintext
Raw Normal View History

2019-04-02 16:15:46 +02:00
filter all
dto all with mapstruct
service all with serviceClass
2019-04-18 16:18:26 +02:00
paginate all with infinite-scroll
2019-04-02 11:07:19 +02:00
2019-04-24 13:08:27 +02:00
enum CustomerKind {
NATURAL,
LEGAL
}
enum VatRegion {
DOMESTIC,
EU,
OTHER
}
2019-04-02 11:07:19 +02:00
entity Customer {
2019-04-18 16:18:26 +02:00
reference Integer required unique min(10000) max(99999),
prefix String required maxlength(3) unique pattern(/[a-z][a-z0-9]+/),
name String required maxlength(80),
2019-04-24 13:08:27 +02:00
kind CustomerKind required,
birthDate LocalDate,
birthPlace String maxlength(80),
registrationCourt String maxlength(80),
registrationNumber String maxlength(80),
vatRegion VatRegion required,
vatNumber String maxlength(40),
contractualSalutation String maxlength(80),
2019-04-18 16:18:26 +02:00
contractualAddress String required maxlength(400),
billingSalutation String maxlength(80),
billingAddress String maxlength(400),
2019-04-18 16:18:26 +02:00
remark String maxlength(160)
2019-04-02 11:07:19 +02:00
}
entity Membership {
2019-04-24 13:08:27 +02:00
admissionDocumentDate LocalDate required,
cancellationDocumentDate LocalDate,
memberFromDate LocalDate required,
memberUntilDate LocalDate,
2019-04-18 16:18:26 +02:00
remark String maxlength(160)
2019-04-02 11:07:19 +02:00
}
enum ShareAction {
SUBSCRIPTION,
CANCELLATION
}
entity Share {
2019-04-18 16:18:26 +02:00
documentDate LocalDate required,
valueDate LocalDate required,
2019-04-02 11:07:19 +02:00
action ShareAction required,
quantity Integer required,
2019-04-18 16:18:26 +02:00
remark String maxlength(160)
2019-04-02 11:07:19 +02:00
}
enum AssetAction {
PAYMENT,
HANDOVER,
ADOPTION,
LOSS,
CLEARING,
PAYBACK
}
entity Asset {
2019-04-18 16:18:26 +02:00
documentDate LocalDate required,
valueDate LocalDate required,
2019-04-02 11:07:19 +02:00
action AssetAction required,
amount BigDecimal required,
2019-04-18 16:18:26 +02:00
remark String maxlength(160)
2019-04-02 11:07:19 +02:00
}
2019-04-18 16:18:26 +02:00
entity SepaMandate {
reference String maxlength(40) unique required,
iban String maxlength(34),
bic String maxlength(11),
2019-04-24 13:08:27 +02:00
grantingDocumentDate LocalDate required,
revokationDocumentDate LocalDate,
validFromDate LocalDate required,
validUntilDate LocalDate,
lastUsedDate LocalDate,
2019-04-18 16:18:26 +02:00
remark String maxlength(160)
2019-04-02 11:07:19 +02:00
}
2019-04-18 16:18:26 +02:00
relationship OneToMany {
Customer{membership} to Membership{customer(prefix) required},
Customer{sepamandate} to SepaMandate{customer(prefix) required},
2019-04-24 13:08:27 +02:00
Membership{share} to Share{membership(admissionDocumentDate) required},
Membership{asset} to Asset{membership(admissionDocumentDate) required}
2019-04-18 16:18:26 +02:00
}