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

83 lines
1.6 KiB
Plaintext
Raw Normal View History

2019-04-02 11:07:19 +02:00
entity Customer {
number Integer required unique min(10000) max(99999),
prefix String required unique pattern(/[a-z][a-z0-9]+/),
}
2019-04-02 15:33:20 +02:00
filter Customer
paginate Customer with infinite-scroll
service Customer with serviceClass
dto Customer with mapstruct
2019-04-02 11:07:19 +02:00
entity Contact {
firstName String required maxlength(80),
lastName String required maxlength(80),
email String required maxlength(80)
}
2019-04-02 15:33:20 +02:00
filter Contact
paginate Contact with infinite-scroll
service Contact with serviceClass
dto Contact with mapstruct
2019-04-02 11:07:19 +02:00
enum CustomerContactRole {
CONTRACTUAL,
TECHNICAL,
FINANCIAL
}
entity CustomerContact {
role CustomerContactRole required
}
2019-04-02 15:33:20 +02:00
service CustomerContact with serviceClass
dto CustomerContact with mapstruct
2019-04-02 11:07:19 +02:00
entity Membership {
sinceDate LocalDate required,
untilDate LocalDate
}
2019-04-02 15:33:20 +02:00
service Membership with serviceClass
dto Membership with mapstruct
2019-04-02 11:07:19 +02:00
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 {
Customer to Membership{customer(prefix)},
Membership to Share{member},
Membership to Asset{member}
}
relationship ManyToOne {
CustomerContact{contact(email) required} to Contact{role},
CustomerContact{customer(prefix) required} to Customer{role}
}