Customer JDL

This commit is contained in:
Michael Hierweck 2019-04-18 16:18:26 +02:00
parent bd5bb859d9
commit c6be30895e
206 changed files with 33 additions and 16148 deletions

View File

@ -1,54 +0,0 @@
{
"name": "Asset",
"fields": [
{
"fieldName": "date",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "action",
"fieldType": "AssetAction",
"fieldValues": "PAYMENT,HANDOVER,ADOPTION,LOSS,CLEARING,PAYBACK",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "amount",
"fieldType": "BigDecimal",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "comment",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 160
}
],
"relationships": [
{
"relationshipType": "many-to-one",
"otherEntityName": "membership",
"otherEntityRelationshipName": "asset",
"relationshipValidateRules": "required",
"relationshipName": "member",
"otherEntityField": "id"
}
],
"changelogDate": "20190403083740",
"entityTableName": "asset",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -1,49 +0,0 @@
{
"name": "Contact",
"fields": [
{
"fieldName": "firstName",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 80
},
{
"fieldName": "lastName",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 80
},
{
"fieldName": "email",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 80
}
],
"relationships": [
{
"relationshipType": "one-to-many",
"otherEntityName": "customerContact",
"otherEntityRelationshipName": "contact",
"relationshipName": "role"
}
],
"changelogDate": "20190403083736",
"entityTableName": "contact",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -1,92 +0,0 @@
{
"name": "Customer",
"fields": [
{
"fieldName": "number",
"fieldType": "Integer",
"fieldValidateRules": [
"required",
"unique",
"min",
"max"
],
"fieldValidateRulesMin": 10000,
"fieldValidateRulesMax": 99999
},
{
"fieldName": "prefix",
"fieldType": "String",
"fieldValidateRules": [
"required",
"unique",
"pattern"
],
"fieldValidateRulesPattern": "[a-z][a-z0-9]+"
},
{
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 80
},
{
"fieldName": "contractualAddress",
"fieldType": "String",
"fieldValidateRules": [
"required",
"maxlength"
],
"fieldValidateRulesMaxlength": 400
},
{
"fieldName": "contractualSalutation",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 80
},
{
"fieldName": "billingAddress",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 400
},
{
"fieldName": "billingSalutation",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 80
}
],
"relationships": [
{
"relationshipType": "one-to-many",
"otherEntityName": "customerContact",
"otherEntityRelationshipName": "customer",
"relationshipName": "role"
},
{
"relationshipType": "one-to-many",
"otherEntityName": "membership",
"otherEntityRelationshipName": "customer",
"relationshipName": "membership"
}
],
"changelogDate": "20190403083735",
"entityTableName": "customer",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -1,40 +0,0 @@
{
"name": "CustomerContact",
"fields": [
{
"fieldName": "role",
"fieldType": "CustomerContactRole",
"fieldValues": "CONTRACTUAL,TECHNICAL,FINANCIAL",
"fieldValidateRules": [
"required"
]
}
],
"relationships": [
{
"relationshipType": "many-to-one",
"otherEntityName": "contact",
"otherEntityRelationshipName": "role",
"relationshipValidateRules": "required",
"relationshipName": "contact",
"otherEntityField": "email"
},
{
"relationshipType": "many-to-one",
"otherEntityName": "customer",
"otherEntityRelationshipName": "role",
"relationshipValidateRules": "required",
"relationshipName": "customer",
"otherEntityField": "prefix"
}
],
"changelogDate": "20190403083737",
"entityTableName": "customer_contact",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -1,47 +0,0 @@
{
"name": "Membership",
"fields": [
{
"fieldName": "sinceDate",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "untilDate",
"fieldType": "LocalDate"
}
],
"relationships": [
{
"relationshipType": "one-to-many",
"otherEntityName": "share",
"otherEntityRelationshipName": "member",
"relationshipName": "share"
},
{
"relationshipType": "one-to-many",
"otherEntityName": "asset",
"otherEntityRelationshipName": "member",
"relationshipName": "asset"
},
{
"relationshipType": "many-to-one",
"otherEntityName": "customer",
"otherEntityRelationshipName": "membership",
"relationshipValidateRules": "required",
"relationshipName": "customer",
"otherEntityField": "prefix"
}
],
"changelogDate": "20190403083738",
"entityTableName": "membership",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -1,54 +0,0 @@
{
"name": "Share",
"fields": [
{
"fieldName": "date",
"fieldType": "LocalDate",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "action",
"fieldType": "ShareAction",
"fieldValues": "SUBSCRIPTION,CANCELLATION",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "quantity",
"fieldType": "Integer",
"fieldValidateRules": [
"required"
]
},
{
"fieldName": "comment",
"fieldType": "String",
"fieldValidateRules": [
"maxlength"
],
"fieldValidateRulesMaxlength": 160
}
],
"relationships": [
{
"relationshipType": "many-to-one",
"otherEntityName": "membership",
"otherEntityRelationshipName": "share",
"relationshipValidateRules": "required",
"relationshipName": "member",
"otherEntityField": "id"
}
],
"changelogDate": "20190403083739",
"entityTableName": "share",
"dto": "mapstruct",
"pagination": "infinite-scroll",
"service": "serviceClass",
"jpaMetamodelFiltering": true,
"fluentMethods": true,
"clientRootFolder": "",
"applications": "*"
}

View File

@ -1,156 +0,0 @@
package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.hostsharing.hsadminng.domain.enumeration.AssetAction;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Objects;
/**
* 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 = "jhi_date", nullable = false)
private LocalDate date;
@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 = "jhi_comment", length = 160)
private String comment;
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("assets")
private Membership member;
// 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 getDate() {
return date;
}
public Asset date(LocalDate date) {
this.date = date;
return this;
}
public void setDate(LocalDate date) {
this.date = date;
}
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 getComment() {
return comment;
}
public Asset comment(String comment) {
this.comment = comment;
return this;
}
public void setComment(String comment) {
this.comment = comment;
}
public Membership getMember() {
return member;
}
public Asset member(Membership membership) {
this.member = membership;
return this;
}
public void setMember(Membership membership) {
this.member = 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() +
", date='" + getDate() + "'" +
", action='" + getAction() + "'" +
", amount=" + getAmount() +
", comment='" + getComment() + "'" +
"}";
}
}

View File

@ -1,148 +0,0 @@
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 Contact.
*/
@Entity
@Table(name = "contact")
public class Contact implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Size(max = 80)
@Column(name = "first_name", length = 80, nullable = false)
private String firstName;
@NotNull
@Size(max = 80)
@Column(name = "last_name", length = 80, nullable = false)
private String lastName;
@NotNull
@Size(max = 80)
@Column(name = "email", length = 80, nullable = false)
private String email;
@OneToMany(mappedBy = "contact")
private Set<CustomerContact> roles = 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 String getFirstName() {
return firstName;
}
public Contact firstName(String firstName) {
this.firstName = firstName;
return this;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public Contact lastName(String lastName) {
this.lastName = lastName;
return this;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public Contact email(String email) {
this.email = email;
return this;
}
public void setEmail(String email) {
this.email = email;
}
public Set<CustomerContact> getRoles() {
return roles;
}
public Contact roles(Set<CustomerContact> customerContacts) {
this.roles = customerContacts;
return this;
}
public Contact addRole(CustomerContact customerContact) {
this.roles.add(customerContact);
customerContact.setContact(this);
return this;
}
public Contact removeRole(CustomerContact customerContact) {
this.roles.remove(customerContact);
customerContact.setContact(null);
return this;
}
public void setRoles(Set<CustomerContact> customerContacts) {
this.roles = customerContacts;
}
// 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;
}
Contact contact = (Contact) o;
if (contact.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), contact.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "Contact{" +
"id=" + getId() +
", firstName='" + getFirstName() + "'" +
", lastName='" + getLastName() + "'" +
", email='" + getEmail() + "'" +
"}";
}
}

View File

@ -1,246 +0,0 @@
package org.hostsharing.hsadminng.domain;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
/**
* 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 = "jhi_number", nullable = false, unique = true)
private Integer number;
@NotNull
@Pattern(regexp = "[a-z][a-z0-9]+")
@Column(name = "prefix", nullable = false, unique = true)
private String prefix;
@NotNull
@Size(max = 80)
@Column(name = "name", length = 80, nullable = false)
private String name;
@NotNull
@Size(max = 400)
@Column(name = "contractual_address", length = 400, nullable = false)
private String contractualAddress;
@Size(max = 80)
@Column(name = "contractual_salutation", length = 80)
private String contractualSalutation;
@Size(max = 400)
@Column(name = "billing_address", length = 400)
private String billingAddress;
@Size(max = 80)
@Column(name = "billing_salutation", length = 80)
private String billingSalutation;
@OneToMany(mappedBy = "customer")
private Set<CustomerContact> roles = new HashSet<>();
@OneToMany(mappedBy = "customer")
private Set<Membership> memberships = 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 getNumber() {
return number;
}
public Customer number(Integer number) {
this.number = number;
return this;
}
public void setNumber(Integer number) {
this.number = number;
}
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 getContractualAddress() {
return contractualAddress;
}
public Customer contractualAddress(String contractualAddress) {
this.contractualAddress = contractualAddress;
return this;
}
public void setContractualAddress(String contractualAddress) {
this.contractualAddress = contractualAddress;
}
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 getBillingAddress() {
return billingAddress;
}
public Customer billingAddress(String billingAddress) {
this.billingAddress = billingAddress;
return this;
}
public void setBillingAddress(String billingAddress) {
this.billingAddress = billingAddress;
}
public String getBillingSalutation() {
return billingSalutation;
}
public Customer billingSalutation(String billingSalutation) {
this.billingSalutation = billingSalutation;
return this;
}
public void setBillingSalutation(String billingSalutation) {
this.billingSalutation = billingSalutation;
}
public Set<CustomerContact> getRoles() {
return roles;
}
public Customer roles(Set<CustomerContact> customerContacts) {
this.roles = customerContacts;
return this;
}
public Customer addRole(CustomerContact customerContact) {
this.roles.add(customerContact);
customerContact.setCustomer(this);
return this;
}
public Customer removeRole(CustomerContact customerContact) {
this.roles.remove(customerContact);
customerContact.setCustomer(null);
return this;
}
public void setRoles(Set<CustomerContact> customerContacts) {
this.roles = customerContacts;
}
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;
}
// 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() +
", number=" + getNumber() +
", prefix='" + getPrefix() + "'" +
", name='" + getName() + "'" +
", contractualAddress='" + getContractualAddress() + "'" +
", contractualSalutation='" + getContractualSalutation() + "'" +
", billingAddress='" + getBillingAddress() + "'" +
", billingSalutation='" + getBillingSalutation() + "'" +
"}";
}
}

View File

@ -1,119 +0,0 @@
package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;
import org.hostsharing.hsadminng.domain.enumeration.CustomerContactRole;
/**
* A CustomerContact.
*/
@Entity
@Table(name = "customer_contact")
public class CustomerContact implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
@SequenceGenerator(name = "sequenceGenerator")
private Long id;
@NotNull
@Enumerated(EnumType.STRING)
@Column(name = "jhi_role", nullable = false)
private CustomerContactRole role;
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("roles")
private Contact contact;
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("roles")
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 CustomerContactRole getRole() {
return role;
}
public CustomerContact role(CustomerContactRole role) {
this.role = role;
return this;
}
public void setRole(CustomerContactRole role) {
this.role = role;
}
public Contact getContact() {
return contact;
}
public CustomerContact contact(Contact contact) {
this.contact = contact;
return this;
}
public void setContact(Contact contact) {
this.contact = contact;
}
public Customer getCustomer() {
return customer;
}
public CustomerContact 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;
}
CustomerContact customerContact = (CustomerContact) o;
if (customerContact.getId() == null || getId() == null) {
return false;
}
return Objects.equals(getId(), customerContact.getId());
}
@Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "CustomerContact{" +
"id=" + getId() +
", role='" + getRole() + "'" +
"}";
}
}

View File

@ -1,171 +0,0 @@
package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
/**
* 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 = "since_date", nullable = false)
private LocalDate sinceDate;
@Column(name = "until_date")
private LocalDate untilDate;
@OneToMany(mappedBy = "member")
private Set<Share> shares = new HashSet<>();
@OneToMany(mappedBy = "member")
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 getSinceDate() {
return sinceDate;
}
public Membership sinceDate(LocalDate sinceDate) {
this.sinceDate = sinceDate;
return this;
}
public void setSinceDate(LocalDate sinceDate) {
this.sinceDate = sinceDate;
}
public LocalDate getUntilDate() {
return untilDate;
}
public Membership untilDate(LocalDate untilDate) {
this.untilDate = untilDate;
return this;
}
public void setUntilDate(LocalDate untilDate) {
this.untilDate = untilDate;
}
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.setMember(this);
return this;
}
public Membership removeShare(Share share) {
this.shares.remove(share);
share.setMember(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.setMember(this);
return this;
}
public Membership removeAsset(Asset asset) {
this.assets.remove(asset);
asset.setMember(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() +
", sinceDate='" + getSinceDate() + "'" +
", untilDate='" + getUntilDate() + "'" +
"}";
}
}

View File

@ -1,155 +0,0 @@
package org.hostsharing.hsadminng.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.hostsharing.hsadminng.domain.enumeration.ShareAction;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDate;
import java.util.Objects;
/**
* 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 = "jhi_date", nullable = false)
private LocalDate date;
@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 = "jhi_comment", length = 160)
private String comment;
@ManyToOne(optional = false)
@NotNull
@JsonIgnoreProperties("shares")
private Membership member;
// 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 getDate() {
return date;
}
public Share date(LocalDate date) {
this.date = date;
return this;
}
public void setDate(LocalDate date) {
this.date = date;
}
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 getComment() {
return comment;
}
public Share comment(String comment) {
this.comment = comment;
return this;
}
public void setComment(String comment) {
this.comment = comment;
}
public Membership getMember() {
return member;
}
public Share member(Membership membership) {
this.member = membership;
return this;
}
public void setMember(Membership membership) {
this.member = 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() +
", date='" + getDate() + "'" +
", action='" + getAction() + "'" +
", quantity=" + getQuantity() +
", comment='" + getComment() + "'" +
"}";
}
}

View File

@ -1,8 +0,0 @@
package org.hostsharing.hsadminng.domain.enumeration;
/**
* The AssetAction enumeration.
*/
public enum AssetAction {
PAYMENT, HANDOVER, ADOPTION, LOSS, CLEARING, PAYBACK
}

View File

@ -1,8 +0,0 @@
package org.hostsharing.hsadminng.domain.enumeration;
/**
* The CustomerContactRole enumeration.
*/
public enum CustomerContactRole {
CONTRACTUAL, TECHNICAL, FINANCIAL
}

View File

@ -1,8 +0,0 @@
package org.hostsharing.hsadminng.domain.enumeration;
/**
* The ShareAction enumeration.
*/
public enum ShareAction {
SUBSCRIPTION, CANCELLATION
}

View File

@ -1,15 +0,0 @@
package org.hostsharing.hsadminng.repository;
import org.hostsharing.hsadminng.domain.Asset;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;
/**
* Spring Data repository for the Asset entity.
*/
@SuppressWarnings("unused")
@Repository
public interface AssetRepository extends JpaRepository<Asset, Long>, JpaSpecificationExecutor<Asset> {
}

View File

@ -1,15 +0,0 @@
package org.hostsharing.hsadminng.repository;