Generated
This commit is contained in:
parent
c6be30895e
commit
fa0ba61de3
61
.jhipster/Asset.json
Normal file
61
.jhipster/Asset.json
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "Asset",
|
||||
"fields": [
|
||||
{
|
||||
"fieldName": "documentDate",
|
||||
"fieldType": "LocalDate",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "valueDate",
|
||||
"fieldType": "LocalDate",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "action",
|
||||
"fieldType": "AssetAction",
|
||||
"fieldValues": "PAYMENT,HANDOVER,ADOPTION,LOSS,CLEARING,PAYBACK",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "amount",
|
||||
"fieldType": "BigDecimal",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "remark",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 160
|
||||
}
|
||||
],
|
||||
"relationships": [
|
||||
{
|
||||
"relationshipType": "many-to-one",
|
||||
"otherEntityName": "membership",
|
||||
"otherEntityRelationshipName": "asset",
|
||||
"relationshipValidateRules": "required",
|
||||
"relationshipName": "membership",
|
||||
"otherEntityField": "documentDate"
|
||||
}
|
||||
],
|
||||
"changelogDate": "20190418143053",
|
||||
"entityTableName": "asset",
|
||||
"dto": "mapstruct",
|
||||
"pagination": "infinite-scroll",
|
||||
"service": "serviceClass",
|
||||
"jpaMetamodelFiltering": true,
|
||||
"fluentMethods": true,
|
||||
"clientRootFolder": "",
|
||||
"applications": "*"
|
||||
}
|
102
.jhipster/Customer.json
Normal file
102
.jhipster/Customer.json
Normal file
@ -0,0 +1,102 @@
|
||||
{
|
||||
"name": "Customer",
|
||||
"fields": [
|
||||
{
|
||||
"fieldName": "reference",
|
||||
"fieldType": "Integer",
|
||||
"fieldValidateRules": [
|
||||
"required",
|
||||
"unique",
|
||||
"min",
|
||||
"max"
|
||||
],
|
||||
"fieldValidateRulesMin": 10000,
|
||||
"fieldValidateRulesMax": 99999
|
||||
},
|
||||
{
|
||||
"fieldName": "prefix",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"required",
|
||||
"maxlength",
|
||||
"unique",
|
||||
"pattern"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 3,
|
||||
"fieldValidateRulesPattern": "[a-z][a-z0-9]+"
|
||||
},
|
||||
{
|
||||
"fieldName": "name",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"required",
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 80
|
||||
},
|
||||
{
|
||||
"fieldName": "contractualSalutation",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 80
|
||||
},
|
||||
{
|
||||
"fieldName": "contractualAddress",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"required",
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 400
|
||||
},
|
||||
{
|
||||
"fieldName": "billingSalutation",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 80
|
||||
},
|
||||
{
|
||||
"fieldName": "billingAddress",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 400
|
||||
},
|
||||
{
|
||||
"fieldName": "remark",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 160
|
||||
}
|
||||
],
|
||||
"relationships": [
|
||||
{
|
||||
"relationshipType": "one-to-many",
|
||||
"otherEntityName": "membership",
|
||||
"otherEntityRelationshipName": "customer",
|
||||
"relationshipName": "membership"
|
||||
},
|
||||
{
|
||||
"relationshipType": "one-to-many",
|
||||
"otherEntityName": "sepaMandate",
|
||||
"otherEntityRelationshipName": "customer",
|
||||
"relationshipName": "sepamandate"
|
||||
}
|
||||
],
|
||||
"changelogDate": "20190418143050",
|
||||
"entityTableName": "customer",
|
||||
"dto": "mapstruct",
|
||||
"pagination": "infinite-scroll",
|
||||
"service": "serviceClass",
|
||||
"jpaMetamodelFiltering": true,
|
||||
"fluentMethods": true,
|
||||
"clientRootFolder": "",
|
||||
"applications": "*"
|
||||
}
|
62
.jhipster/Membership.json
Normal file
62
.jhipster/Membership.json
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"name": "Membership",
|
||||
"fields": [
|
||||
{
|
||||
"fieldName": "documentDate",
|
||||
"fieldType": "LocalDate",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "memberFrom",
|
||||
"fieldType": "LocalDate",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "memberUntil",
|
||||
"fieldType": "LocalDate"
|
||||
},
|
||||
{
|
||||
"fieldName": "remark",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 160
|
||||
}
|
||||
],
|
||||
"relationships": [
|
||||
{
|
||||
"relationshipType": "one-to-many",
|
||||
"otherEntityName": "share",
|
||||
"otherEntityRelationshipName": "membership",
|
||||
"relationshipName": "share"
|
||||
},
|
||||
{
|
||||
"relationshipType": "one-to-many",
|
||||
"otherEntityName": "asset",
|
||||
"otherEntityRelationshipName": "membership",
|
||||
"relationshipName": "asset"
|
||||
},
|
||||
{
|
||||
"relationshipType": "many-to-one",
|
||||
"otherEntityName": "customer",
|
||||
"otherEntityRelationshipName": "membership",
|
||||
"relationshipValidateRules": "required",
|
||||
"relationshipName": "customer",
|
||||
"otherEntityField": "prefix"
|
||||
}
|
||||
],
|
||||
"changelogDate": "20190418143051",
|
||||
"entityTableName": "membership",
|
||||
"dto": "mapstruct",
|
||||
"pagination": "infinite-scroll",
|
||||
"service": "serviceClass",
|
||||
"jpaMetamodelFiltering": true,
|
||||
"fluentMethods": true,
|
||||
"clientRootFolder": "",
|
||||
"applications": "*"
|
||||
}
|
84
.jhipster/SepaMandate.json
Normal file
84
.jhipster/SepaMandate.json
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
"name": "SepaMandate",
|
||||
"fields": [
|
||||
{
|
||||
"fieldName": "reference",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength",
|
||||
"unique",
|
||||
"required"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 40
|
||||
},
|
||||
{
|
||||
"fieldName": "iban",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 34
|
||||
},
|
||||
{
|
||||
"fieldName": "bic",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 11
|
||||
},
|
||||
{
|
||||
"fieldName": "documentDate",
|
||||
"fieldType": "LocalDate",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "validFrom",
|
||||
"fieldType": "LocalDate",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "validUntil",
|
||||
"fieldType": "LocalDate"
|
||||
},
|
||||
{
|
||||
"fieldName": "lastUsed",
|
||||
"fieldType": "LocalDate"
|
||||
},
|
||||
{
|
||||
"fieldName": "cancellationDate",
|
||||
"fieldType": "LocalDate"
|
||||
},
|
||||
{
|
||||
"fieldName": "remark",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 160
|
||||
}
|
||||
],
|
||||
"relationships": [
|
||||
{
|
||||
"relationshipType": "many-to-one",
|
||||
"otherEntityName": "customer",
|
||||
"otherEntityRelationshipName": "sepamandate",
|
||||
"relationshipValidateRules": "required",
|
||||
"relationshipName": "customer",
|
||||
"otherEntityField": "prefix"
|
||||
}
|
||||
],
|
||||
"changelogDate": "20190418143054",
|
||||
"entityTableName": "sepa_mandate",
|
||||
"dto": "mapstruct",
|
||||
"pagination": "infinite-scroll",
|
||||
"service": "serviceClass",
|
||||
"jpaMetamodelFiltering": true,
|
||||
"fluentMethods": true,
|
||||
"clientRootFolder": "",
|
||||
"applications": "*"
|
||||
}
|
61
.jhipster/Share.json
Normal file
61
.jhipster/Share.json
Normal file
@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "Share",
|
||||
"fields": [
|
||||
{
|
||||
"fieldName": "documentDate",
|
||||
"fieldType": "LocalDate",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "valueDate",
|
||||
"fieldType": "LocalDate",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "action",
|
||||
"fieldType": "ShareAction",
|
||||
"fieldValues": "SUBSCRIPTION,CANCELLATION",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "quantity",
|
||||
"fieldType": "Integer",
|
||||
"fieldValidateRules": [
|
||||
"required"
|
||||
]
|
||||
},
|
||||
{
|
||||
"fieldName": "remark",
|
||||
"fieldType": "String",
|
||||
"fieldValidateRules": [
|
||||
"maxlength"
|
||||
],
|
||||
"fieldValidateRulesMaxlength": 160
|
||||
}
|
||||
],
|
||||
"relationships": [
|
||||
{
|
||||
"relationshipType": "many-to-one",
|
||||
"otherEntityName": "membership",
|
||||
"otherEntityRelationshipName": "share",
|
||||
"relationshipValidateRules": "required",
|
||||
"relationshipName": "membership",
|
||||
"otherEntityField": "documentDate"
|
||||
}
|
||||
],
|
||||
"changelogDate": "20190418143052",
|
||||
"entityTableName": "share",
|
||||
"dto": "mapstruct",
|
||||
"pagination": "infinite-scroll",
|
||||
"service": "serviceClass",
|
||||
"jpaMetamodelFiltering": true,
|
||||
"fluentMethods": true,
|
||||
"clientRootFolder": "",
|
||||
"applications": "*"
|
||||
}
|
175
src/main/java/org/hostsharing/hsadminng/domain/Asset.java
Normal file
175
src/main/java/org/hostsharing/hsadminng/domain/Asset.java
Normal file
@ -0,0 +1,175 @@
|
||||
package org.hostsharing.hsadminng.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.hostsharing.hsadminng.domain.enumeration.AssetAction;
|
||||
|
||||
/**
|
||||
* A Asset.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "asset")
|
||||
public class Asset implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
|
||||
@SequenceGenerator(name = "sequenceGenerator")
|
||||
private Long id;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "document_date", nullable = false)
|
||||
private LocalDate documentDate;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "value_date", nullable = false)
|
||||
private LocalDate valueDate;
|
||||
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "action", nullable = false)
|
||||
private AssetAction action;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "amount", precision = 10, scale = 2, nullable = false)
|
||||
private BigDecimal amount;
|
||||
|
||||
@Size(max = 160)
|
||||
@Column(name = "remark", length = 160)
|
||||
private String remark;
|
||||
|
||||
@ManyToOne(optional = false)
|
||||
@NotNull
|
||||
@JsonIgnoreProperties("assets")
|
||||
private Membership membership;
|
||||
|
||||
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public LocalDate getDocumentDate() {
|
||||
return documentDate;
|
||||
}
|
||||
|
||||
public Asset documentDate(LocalDate documentDate) {
|
||||
this.documentDate = documentDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setDocumentDate(LocalDate documentDate) {
|
||||
this.documentDate = documentDate;
|
||||
}
|
||||
|
||||
public LocalDate getValueDate() {
|
||||
return valueDate;
|
||||
}
|
||||
|
||||
public Asset valueDate(LocalDate valueDate) {
|
||||
this.valueDate = valueDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setValueDate(LocalDate valueDate) {
|
||||
this.valueDate = valueDate;
|
||||
}
|
||||
|
||||
public AssetAction getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public Asset action(AssetAction action) {
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setAction(AssetAction action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public Asset amount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public Asset remark(String remark) {
|
||||
this.remark = remark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Membership getMembership() {
|
||||
return membership;
|
||||
}
|
||||
|
||||
public Asset membership(Membership membership) {
|
||||
this.membership = membership;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setMembership(Membership membership) {
|
||||
this.membership = membership;
|
||||
}
|
||||
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Asset asset = (Asset) o;
|
||||
if (asset.getId() == null || getId() == null) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(getId(), asset.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Asset{" +
|
||||
"id=" + getId() +
|
||||
", documentDate='" + getDocumentDate() + "'" +
|
||||
", valueDate='" + getValueDate() + "'" +
|
||||
", action='" + getAction() + "'" +
|
||||
", amount=" + getAmount() +
|
||||
", remark='" + getRemark() + "'" +
|
||||
"}";
|
||||
}
|
||||
}
|
268
src/main/java/org/hostsharing/hsadminng/domain/Customer.java
Normal file
268
src/main/java/org/hostsharing/hsadminng/domain/Customer.java
Normal file
@ -0,0 +1,268 @@
|
||||
package org.hostsharing.hsadminng.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A Customer.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "customer")
|
||||
public class Customer implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
|
||||
@SequenceGenerator(name = "sequenceGenerator")
|
||||
private Long id;
|
||||
|
||||
@NotNull
|
||||
@Min(value = 10000)
|
||||
@Max(value = 99999)
|
||||
@Column(name = "reference", nullable = false, unique = true)
|
||||
private Integer reference;
|
||||
|
||||
@NotNull
|
||||
@Size(max = 3)
|
||||
@Pattern(regexp = "[a-z][a-z0-9]+")
|
||||
@Column(name = "prefix", length = 3, nullable = false, unique = true)
|
||||
private String prefix;
|
||||
|
||||
@NotNull
|
||||
@Size(max = 80)
|
||||
@Column(name = "name", length = 80, nullable = false)
|
||||
private String name;
|
||||
|
||||
@Size(max = 80)
|
||||
@Column(name = "contractual_salutation", length = 80)
|
||||
private String contractualSalutation;
|
||||
|
||||
@NotNull
|
||||
@Size(max = 400)
|
||||
@Column(name = "contractual_address", length = 400, nullable = false)
|
||||
private String contractualAddress;
|
||||
|
||||
@Size(max = 80)
|
||||
@Column(name = "billing_salutation", length = 80)
|
||||
private String billingSalutation;
|
||||
|
||||
@Size(max = 400)
|
||||
@Column(name = "billing_address", length = 400)
|
||||
private String billingAddress;
|
||||
|
||||
@Size(max = 160)
|
||||
@Column(name = "remark", length = 160)
|
||||
private String remark;
|
||||
|
||||
@OneToMany(mappedBy = "customer")
|
||||
private Set<Membership> memberships = new HashSet<>();
|
||||
@OneToMany(mappedBy = "customer")
|
||||
private Set<SepaMandate> sepamandates = new HashSet<>();
|
||||
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getReference() {
|
||||
return reference;
|
||||
}
|
||||
|
||||
public Customer reference(Integer reference) {
|
||||
this.reference = reference;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setReference(Integer reference) {
|
||||
this.reference = reference;
|
||||
}
|
||||
|
||||
public String getPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
public Customer prefix(String prefix) {
|
||||
this.prefix = prefix;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setPrefix(String prefix) {
|
||||
this.prefix = prefix;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Customer name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getContractualSalutation() {
|
||||
return contractualSalutation;
|
||||
}
|
||||
|
||||
public Customer contractualSalutation(String contractualSalutation) {
|
||||
this.contractualSalutation = contractualSalutation;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setContractualSalutation(String contractualSalutation) {
|
||||
this.contractualSalutation = contractualSalutation;
|
||||
}
|
||||
|
||||
public String getContractualAddress() {
|
||||
return contractualAddress;
|
||||
}
|
||||
|
||||
public Customer contractualAddress(String contractualAddress) {
|
||||
this.contractualAddress = contractualAddress;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setContractualAddress(String contractualAddress) {
|
||||
this.contractualAddress = contractualAddress;
|
||||
}
|
||||
|
||||
public String getBillingSalutation() {
|
||||
return billingSalutation;
|
||||
}
|
||||
|
||||
public Customer billingSalutation(String billingSalutation) {
|
||||
this.billingSalutation = billingSalutation;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setBillingSalutation(String billingSalutation) {
|
||||
this.billingSalutation = billingSalutation;
|
||||
}
|
||||
|
||||
public String getBillingAddress() {
|
||||
return billingAddress;
|
||||
}
|
||||
|
||||
public Customer billingAddress(String billingAddress) {
|
||||
this.billingAddress = billingAddress;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setBillingAddress(String billingAddress) {
|
||||
this.billingAddress = billingAddress;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public Customer remark(String remark) {
|
||||
this.remark = remark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Set<Membership> getMemberships() {
|
||||
return memberships;
|
||||
}
|
||||
|
||||
public Customer memberships(Set<Membership> memberships) {
|
||||
this.memberships = memberships;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Customer addMembership(Membership membership) {
|
||||
this.memberships.add(membership);
|
||||
membership.setCustomer(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Customer removeMembership(Membership membership) {
|
||||
this.memberships.remove(membership);
|
||||
membership.setCustomer(null);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setMemberships(Set<Membership> memberships) {
|
||||
this.memberships = memberships;
|
||||
}
|
||||
|
||||
public Set<SepaMandate> getSepamandates() {
|
||||
return sepamandates;
|
||||
}
|
||||
|
||||
public Customer sepamandates(Set<SepaMandate> sepaMandates) {
|
||||
this.sepamandates = sepaMandates;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Customer addSepamandate(SepaMandate sepaMandate) {
|
||||
this.sepamandates.add(sepaMandate);
|
||||
sepaMandate.setCustomer(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Customer removeSepamandate(SepaMandate sepaMandate) {
|
||||
this.sepamandates.remove(sepaMandate);
|
||||
sepaMandate.setCustomer(null);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setSepamandates(Set<SepaMandate> sepaMandates) {
|
||||
this.sepamandates = sepaMandates;
|
||||
}
|
||||
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Customer customer = (Customer) o;
|
||||
if (customer.getId() == null || getId() == null) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(getId(), customer.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Customer{" +
|
||||
"id=" + getId() +
|
||||
", reference=" + getReference() +
|
||||
", prefix='" + getPrefix() + "'" +
|
||||
", name='" + getName() + "'" +
|
||||
", contractualSalutation='" + getContractualSalutation() + "'" +
|
||||
", contractualAddress='" + getContractualAddress() + "'" +
|
||||
", billingSalutation='" + getBillingSalutation() + "'" +
|
||||
", billingAddress='" + getBillingAddress() + "'" +
|
||||
", remark='" + getRemark() + "'" +
|
||||
"}";
|
||||
}
|
||||
}
|
209
src/main/java/org/hostsharing/hsadminng/domain/Membership.java
Normal file
209
src/main/java/org/hostsharing/hsadminng/domain/Membership.java
Normal file
@ -0,0 +1,209 @@
|
||||
package org.hostsharing.hsadminng.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A Membership.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "membership")
|
||||
public class Membership implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
|
||||
@SequenceGenerator(name = "sequenceGenerator")
|
||||
private Long id;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "document_date", nullable = false)
|
||||
private LocalDate documentDate;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "member_from", nullable = false)
|
||||
private LocalDate memberFrom;
|
||||
|
||||
@Column(name = "member_until")
|
||||
private LocalDate memberUntil;
|
||||
|
||||
@Size(max = 160)
|
||||
@Column(name = "remark", length = 160)
|
||||
private String remark;
|
||||
|
||||
@OneToMany(mappedBy = "membership")
|
||||
private Set<Share> shares = new HashSet<>();
|
||||
@OneToMany(mappedBy = "membership")
|
||||
private Set<Asset> assets = new HashSet<>();
|
||||
@ManyToOne(optional = false)
|
||||
@NotNull
|
||||
@JsonIgnoreProperties("memberships")
|
||||
private Customer customer;
|
||||
|
||||
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public LocalDate getDocumentDate() {
|
||||
return documentDate;
|
||||
}
|
||||
|
||||
public Membership documentDate(LocalDate documentDate) {
|
||||
this.documentDate = documentDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setDocumentDate(LocalDate documentDate) {
|
||||
this.documentDate = documentDate;
|
||||
}
|
||||
|
||||
public LocalDate getMemberFrom() {
|
||||
return memberFrom;
|
||||
}
|
||||
|
||||
public Membership memberFrom(LocalDate memberFrom) {
|
||||
this.memberFrom = memberFrom;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setMemberFrom(LocalDate memberFrom) {
|
||||
this.memberFrom = memberFrom;
|
||||
}
|
||||
|
||||
public LocalDate getMemberUntil() {
|
||||
return memberUntil;
|
||||
}
|
||||
|
||||
public Membership memberUntil(LocalDate memberUntil) {
|
||||
this.memberUntil = memberUntil;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setMemberUntil(LocalDate memberUntil) {
|
||||
this.memberUntil = memberUntil;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public Membership remark(String remark) {
|
||||
this.remark = remark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Set<Share> getShares() {
|
||||
return shares;
|
||||
}
|
||||
|
||||
public Membership shares(Set<Share> shares) {
|
||||
this.shares = shares;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Membership addShare(Share share) {
|
||||
this.shares.add(share);
|
||||
share.setMembership(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Membership removeShare(Share share) {
|
||||
this.shares.remove(share);
|
||||
share.setMembership(null);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setShares(Set<Share> shares) {
|
||||
this.shares = shares;
|
||||
}
|
||||
|
||||
public Set<Asset> getAssets() {
|
||||
return assets;
|
||||
}
|
||||
|
||||
public Membership assets(Set<Asset> assets) {
|
||||
this.assets = assets;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Membership addAsset(Asset asset) {
|
||||
this.assets.add(asset);
|
||||
asset.setMembership(this);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Membership removeAsset(Asset asset) {
|
||||
this.assets.remove(asset);
|
||||
asset.setMembership(null);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setAssets(Set<Asset> assets) {
|
||||
this.assets = assets;
|
||||
}
|
||||
|
||||
public Customer getCustomer() {
|
||||
return customer;
|
||||
}
|
||||
|
||||
public Membership customer(Customer customer) {
|
||||
this.customer = customer;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setCustomer(Customer customer) {
|
||||
this.customer = customer;
|
||||
}
|
||||
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Membership membership = (Membership) o;
|
||||
if (membership.getId() == null || getId() == null) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(getId(), membership.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Membership{" +
|
||||
"id=" + getId() +
|
||||
", documentDate='" + getDocumentDate() + "'" +
|
||||
", memberFrom='" + getMemberFrom() + "'" +
|
||||
", memberUntil='" + getMemberUntil() + "'" +
|
||||
", remark='" + getRemark() + "'" +
|
||||
"}";
|
||||
}
|
||||
}
|
241
src/main/java/org/hostsharing/hsadminng/domain/SepaMandate.java
Normal file
241
src/main/java/org/hostsharing/hsadminng/domain/SepaMandate.java
Normal file
@ -0,0 +1,241 @@
|
||||
package org.hostsharing.hsadminng.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* A SepaMandate.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "sepa_mandate")
|
||||
public class SepaMandate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
|
||||
@SequenceGenerator(name = "sequenceGenerator")
|
||||
private Long id;
|
||||
|
||||
@NotNull
|
||||
@Size(max = 40)
|
||||
@Column(name = "reference", length = 40, nullable = false, unique = true)
|
||||
private String reference;
|
||||
|
||||
@Size(max = 34)
|
||||
@Column(name = "iban", length = 34)
|
||||
private String iban;
|
||||
|
||||
@Size(max = 11)
|
||||
@Column(name = "bic", length = 11)
|
||||
private String bic;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "document_date", nullable = false)
|
||||
private LocalDate documentDate;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "valid_from", nullable = false)
|
||||
private LocalDate validFrom;
|
||||
|
||||
@Column(name = "valid_until")
|
||||
private LocalDate validUntil;
|
||||
|
||||
@Column(name = "last_used")
|
||||
private LocalDate lastUsed;
|
||||
|
||||
@Column(name = "cancellation_date")
|
||||
private LocalDate cancellationDate;
|
||||
|
||||
@Size(max = 160)
|
||||
@Column(name = "remark", length = 160)
|
||||
private String remark;
|
||||
|
||||
@ManyToOne(optional = false)
|
||||
@NotNull
|
||||
@JsonIgnoreProperties("sepamandates")
|
||||
private Customer customer;
|
||||
|
||||
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getReference() {
|
||||
return reference;
|
||||
}
|
||||
|
||||
public SepaMandate reference(String reference) {
|
||||
this.reference = reference;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setReference(String reference) {
|
||||
this.reference = reference;
|
||||
}
|
||||
|
||||
public String getIban() {
|
||||
return iban;
|
||||
}
|
||||
|
||||
public SepaMandate iban(String iban) {
|
||||
this.iban = iban;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setIban(String iban) {
|
||||
this.iban = iban;
|
||||
}
|
||||
|
||||
public String getBic() {
|
||||
return bic;
|
||||
}
|
||||
|
||||
public SepaMandate bic(String bic) {
|
||||
this.bic = bic;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setBic(String bic) {
|
||||
this.bic = bic;
|
||||
}
|
||||
|
||||
public LocalDate getDocumentDate() {
|
||||
return documentDate;
|
||||
}
|
||||
|
||||
public SepaMandate documentDate(LocalDate documentDate) {
|
||||
this.documentDate = documentDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setDocumentDate(LocalDate documentDate) {
|
||||
this.documentDate = documentDate;
|
||||
}
|
||||
|
||||
public LocalDate getValidFrom() {
|
||||
return validFrom;
|
||||
}
|
||||
|
||||
public SepaMandate validFrom(LocalDate validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setValidFrom(LocalDate validFrom) {
|
||||
this.validFrom = validFrom;
|
||||
}
|
||||
|
||||
public LocalDate getValidUntil() {
|
||||
return validUntil;
|
||||
}
|
||||
|
||||
public SepaMandate validUntil(LocalDate validUntil) {
|
||||
this.validUntil = validUntil;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setValidUntil(LocalDate validUntil) {
|
||||
this.validUntil = validUntil;
|
||||
}
|
||||
|
||||
public LocalDate getLastUsed() {
|
||||
return lastUsed;
|
||||
}
|
||||
|
||||
public SepaMandate lastUsed(LocalDate lastUsed) {
|
||||
this.lastUsed = lastUsed;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setLastUsed(LocalDate lastUsed) {
|
||||
this.lastUsed = lastUsed;
|
||||
}
|
||||
|
||||
public LocalDate getCancellationDate() {
|
||||
return cancellationDate;
|
||||
}
|
||||
|
||||
public SepaMandate cancellationDate(LocalDate cancellationDate) {
|
||||
this.cancellationDate = cancellationDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setCancellationDate(LocalDate cancellationDate) {
|
||||
this.cancellationDate = cancellationDate;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public SepaMandate remark(String remark) {
|
||||
this.remark = remark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Customer getCustomer() {
|
||||
return customer;
|
||||
}
|
||||
|
||||
public SepaMandate customer(Customer customer) {
|
||||
this.customer = customer;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setCustomer(Customer customer) {
|
||||
this.customer = customer;
|
||||
}
|
||||
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SepaMandate sepaMandate = (SepaMandate) o;
|
||||
if (sepaMandate.getId() == null || getId() == null) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(getId(), sepaMandate.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SepaMandate{" +
|
||||
"id=" + getId() +
|
||||
", reference='" + getReference() + "'" +
|
||||
", iban='" + getIban() + "'" +
|
||||
", bic='" + getBic() + "'" +
|
||||
", documentDate='" + getDocumentDate() + "'" +
|
||||
", validFrom='" + getValidFrom() + "'" +
|
||||
", validUntil='" + getValidUntil() + "'" +
|
||||
", lastUsed='" + getLastUsed() + "'" +
|
||||
", cancellationDate='" + getCancellationDate() + "'" +
|
||||
", remark='" + getRemark() + "'" +
|
||||
"}";
|
||||
}
|
||||
}
|
174
src/main/java/org/hostsharing/hsadminng/domain/Share.java
Normal file
174
src/main/java/org/hostsharing/hsadminng/domain/Share.java
Normal file
@ -0,0 +1,174 @@
|
||||
package org.hostsharing.hsadminng.domain;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Objects;
|
||||
|
||||
import org.hostsharing.hsadminng.domain.enumeration.ShareAction;
|
||||
|
||||
/**
|
||||
* A Share.
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "share")
|
||||
public class Share implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
|
||||
@SequenceGenerator(name = "sequenceGenerator")
|
||||
private Long id;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "document_date", nullable = false)
|
||||
private LocalDate documentDate;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "value_date", nullable = false)
|
||||
private LocalDate valueDate;
|
||||
|
||||
@NotNull
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "action", nullable = false)
|
||||
private ShareAction action;
|
||||
|
||||
@NotNull
|
||||
@Column(name = "quantity", nullable = false)
|
||||
private Integer quantity;
|
||||
|
||||
@Size(max = 160)
|
||||
@Column(name = "remark", length = 160)
|
||||
private String remark;
|
||||
|
||||
@ManyToOne(optional = false)
|
||||
@NotNull
|
||||
@JsonIgnoreProperties("shares")
|
||||
private Membership membership;
|
||||
|
||||
// jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public LocalDate getDocumentDate() {
|
||||
return documentDate;
|
||||
}
|
||||
|
||||
public Share documentDate(LocalDate documentDate) {
|
||||
this.documentDate = documentDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setDocumentDate(LocalDate documentDate) {
|
||||
this.documentDate = documentDate;
|
||||
}
|
||||
|
||||
public LocalDate getValueDate() {
|
||||
return valueDate;
|
||||
}
|
||||
|
||||
public Share valueDate(LocalDate valueDate) {
|
||||
this.valueDate = valueDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setValueDate(LocalDate valueDate) {
|
||||
this.valueDate = valueDate;
|
||||
}
|
||||
|
||||
public ShareAction getAction() {
|
||||
return action;
|
||||
}
|
||||
|
||||
public Share action(ShareAction action) {
|
||||
this.action = action;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setAction(ShareAction action) {
|
||||
this.action = action;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public Share quantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public Share remark(String remark) {
|
||||
this.remark = remark;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Membership getMembership() {
|
||||
return membership;
|
||||
}
|
||||
|
||||
public Share membership(Membership membership) {
|
||||
this.membership = membership;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setMembership(Membership membership) {
|
||||
this.membership = membership;
|
||||
}
|
||||
// jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
Share share = (Share) o;
|
||||
if (share.getId() == null || getId() == null) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(getId(), share.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Share{" +
|
||||
"id=" + getId() +
|
||||
", documentDate='" + getDocumentDate() + "'" +
|
||||
", valueDate='" + getValueDate() + "'" +
|
||||
", action='" + getAction() + "'" +
|
||||
", quantity=" + getQuantity() +
|
||||
", remark='" + getRemark() + "'" +
|
||||
"}";
|
||||
}
|
||||
}
|