Skip to content

Instantly share code, notes, and snippets.

@J-Graham
Created October 22, 2020 02:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save J-Graham/afe64f5a8edad22e5998da8842784104 to your computer and use it in GitHub Desktop.
Save J-Graham/afe64f5a8edad22e5998da8842784104 to your computer and use it in GitHub Desktop.
Customer Interface Model
import { IEntity, IVersionable, IDocument, INote } from './base';
import { IContact } from './contact';
import { ICustomerAddress } from './customer-address';
import { ICustomerPhone } from './customer-phone';
import { ICustomerSource } from './customer-source';
import { ICustomerStatus } from './customer-status';
export interface ICustomer extends IEntity, IVersionable {
Name: string;
StatusId: number;
SourceId: number;
// reverse nav
Contacts?: IContact[];
CustomerAddresses?: ICustomerAddress[];
CustomerPhones?: ICustomerPhone[];
Documents?: IDocument[];
Notes?: INote[];
// foreign keys
CustomerSource?: ICustomerSource;
CustomerStatus?: ICustomerStatus;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment