import of initial customer.jdl including related entities
This commit is contained in:
30
src/main/webapp/app/shared/model/asset.model.ts
Normal file
30
src/main/webapp/app/shared/model/asset.model.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import { Moment } from 'moment';
|
||||
|
||||
export const enum AssetAction {
|
||||
PAYMENT = 'PAYMENT',
|
||||
HANDOVER = 'HANDOVER',
|
||||
ADOPTION = 'ADOPTION',
|
||||
LOSS = 'LOSS',
|
||||
CLEARING = 'CLEARING',
|
||||
PAYBACK = 'PAYBACK'
|
||||
}
|
||||
|
||||
export interface IAsset {
|
||||
id?: number;
|
||||
date?: Moment;
|
||||
action?: AssetAction;
|
||||
amount?: number;
|
||||
comment?: string;
|
||||
memberId?: number;
|
||||
}
|
||||
|
||||
export class Asset implements IAsset {
|
||||
constructor(
|
||||
public id?: number,
|
||||
public date?: Moment,
|
||||
public action?: AssetAction,
|
||||
public amount?: number,
|
||||
public comment?: string,
|
||||
public memberId?: number
|
||||
) {}
|
||||
}
|
19
src/main/webapp/app/shared/model/contact.model.ts
Normal file
19
src/main/webapp/app/shared/model/contact.model.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { ICustomerContact } from 'app/shared/model/customer-contact.model';
|
||||
|
||||
export interface IContact {
|
||||
id?: number;
|
||||
firstName?: string;
|
||||
lastName?: string;
|
||||
email?: string;
|
||||
roles?: ICustomerContact[];
|
||||
}
|
||||
|
||||
export class Contact implements IContact {
|
||||
constructor(
|
||||
public id?: number,
|
||||
public firstName?: string,
|
||||
public lastName?: string,
|
||||
public email?: string,
|
||||
public roles?: ICustomerContact[]
|
||||
) {}
|
||||
}
|
25
src/main/webapp/app/shared/model/customer-contact.model.ts
Normal file
25
src/main/webapp/app/shared/model/customer-contact.model.ts
Normal file
@ -0,0 +1,25 @@
|
||||
export const enum CustomerContactRole {
|
||||
CONTRACTUAL = 'CONTRACTUAL',
|
||||
TECHNICAL = 'TECHNICAL',
|
||||
FINANCIAL = 'FINANCIAL'
|
||||
}
|
||||
|
||||
export interface ICustomerContact {
|
||||
id?: number;
|
||||
role?: CustomerContactRole;
|
||||
contactEmail?: string;
|
||||
contactId?: number;
|
||||
customerPrefix?: string;
|
||||
customerId?: number;
|
||||
}
|
||||
|
||||
export class CustomerContact implements ICustomerContact {
|
||||
constructor(
|
||||
public id?: number,
|
||||
public role?: CustomerContactRole,
|
||||
public contactEmail?: string,
|
||||
public contactId?: number,
|
||||
public customerPrefix?: string,
|
||||
public customerId?: number
|
||||
) {}
|
||||
}
|
20
src/main/webapp/app/shared/model/customer.model.ts
Normal file
20
src/main/webapp/app/shared/model/customer.model.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { IMembership } from 'app/shared/model/membership.model';
|
||||
import { ICustomerContact } from 'app/shared/model/customer-contact.model';
|
||||
|
||||
export interface ICustomer {
|
||||
id?: number;
|
||||
number?: number;
|
||||
prefix?: string;
|
||||
memberships?: IMembership[];
|
||||
roles?: ICustomerContact[];
|
||||
}
|
||||
|
||||
export class Customer implements ICustomer {
|
||||
constructor(
|
||||
public id?: number,
|
||||
public number?: number,
|
||||
public prefix?: string,
|
||||
public memberships?: IMembership[],
|
||||
public roles?: ICustomerContact[]
|
||||
) {}
|
||||
}
|
25
src/main/webapp/app/shared/model/membership.model.ts
Normal file
25
src/main/webapp/app/shared/model/membership.model.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import { Moment } from 'moment';
|
||||
import { IShare } from 'app/shared/model/share.model';
|
||||
import { IAsset } from 'app/shared/model/asset.model';
|
||||
|
||||
export interface IMembership {
|
||||
id?: number;
|
||||
sinceDate?: Moment;
|
||||
untilDate?: Moment;
|
||||
shares?: IShare[];
|
||||
assets?: IAsset[];
|
||||
customerPrefix?: string;
|
||||
customerId?: number;
|
||||
}
|
||||
|
||||
export class Membership implements IMembership {
|
||||
constructor(
|
||||
public id?: number,
|
||||
public sinceDate?: Moment,
|
||||
public untilDate?: Moment,
|
||||
public shares?: IShare[],
|
||||
public assets?: IAsset[],
|
||||
public customerPrefix?: string,
|
||||
public customerId?: number
|
||||
) {}
|
||||
}
|
26
src/main/webapp/app/shared/model/share.model.ts
Normal file
26
src/main/webapp/app/shared/model/share.model.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { Moment } from 'moment';
|
||||
|
||||
export const enum ShareAction {
|
||||
SUBSCRIPTION = 'SUBSCRIPTION',
|
||||
CANCELLATION = 'CANCELLATION'
|
||||
}
|
||||
|
||||
export interface IShare {
|
||||
id?: number;
|
||||
date?: Moment;
|
||||
action?: ShareAction;
|
||||
quantity?: number;
|
||||
comment?: string;
|
||||
memberId?: number;
|
||||
}
|
||||
|
||||
export class Share implements IShare {
|
||||
constructor(
|
||||
public id?: number,
|
||||
public date?: Moment,
|
||||
public action?: ShareAction,
|
||||
public quantity?: number,
|
||||
public comment?: string,
|
||||
public memberId?: number
|
||||
) {}
|
||||
}
|
Reference in New Issue
Block a user