hs.hsadmin.ng/src/main/jdl/customer.jdl
2019-04-12 16:46:43 +02:00

73 lines
1.5 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),
contractualAddress String required maxlength(400),
contractualSalutation String maxlength(80),
billingAddress String maxlength(400),
billingSalutation String maxlength(80)
}
entity Contact {
firstName String required maxlength(80),
lastName String required maxlength(80),
email String required maxlength(80)
}
enum CustomerContactRole {
CONTRACTUAL,
TECHNICAL,
FINANCIAL
}
entity CustomerContact {
role CustomerContactRole required
}
entity Membership {
sinceDate LocalDate required,
untilDate LocalDate
}
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)
}
relationship OneToMany {
Contact{role} to CustomerContact{contact(email) required},
Customer{role} to CustomerContact{customer(prefix) required},
Customer to Membership{customer(prefix) required},
Membership to Share{member required},
Membership to Asset{member required}
}