1
0
hs.hsadmin.ng/src/main/jdl/customer.jdl
2019-04-18 09:33:55 +02:00

68 lines
1.6 KiB
Plaintext

filter all
dto all with mapstruct
service all with serviceClass
paginate all with infinite-scroll
entity Customer {
number Integer required unique min(10000) max(99999),
prefix String required unique pattern(/[a-z][a-z0-9]+/),
name String required maxlength(80),
contractualSalutation String maxlength(80),
contractualAddress String required maxlength(400),
billingSalutation String maxlength(80),
billingAddress String maxlength(400)
}
entity Membership {
from LocalDate required,
to LocalDate,
comment String maxlength(160)
}
enum ShareAction {
SUBSCRIPTION,
CANCELLATION
}
entity Share {
date LocalDate required,
action ShareAction required,
quantity Integer required,
comment String maxlength(160)
}
enum AssetAction {
PAYMENT,
HANDOVER,
ADOPTION,
LOSS,
CLEARING,
PAYBACK
}
entity Asset {
date LocalDate required,
action AssetAction required,
amount BigDecimal required,
comment String maxlength(160)
}
entity SepaMandate {
reference String maxlength(40) unique required,
iban String maxlength(34),
bic String maxlength(11),
created LocalDate required,
validFrom LocalDate required,
validTo LocalDate,
lastUsed LocalDate,
cancelled LocalDate,
comment String maxlength(160)
}
relationship OneToMany {
Customer{membership} to Membership{customer(prefix) required},
Customer{sepamandate} to SepaMandate{customer(prefix) required},
Membership{share} to Share{membership(from) required},
Membership{asset} to Asset{membership(from) required}
}