Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
TeamDbAwesome/TeamDBAwesome/TeamDBAwesome/js/HolderService.js
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
71 lines (65 sloc)
1.64 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.service('HolderService', function () { | |
//declare the type | |
//don't change this without also changing the data model | |
var Blank_Customer = { | |
FName: null, | |
LName: null, | |
Address: null, | |
City: null, | |
State: null, | |
Post: null, | |
Country: null, | |
Phone: null, | |
Fax: null, | |
Email: null, | |
Company: null, | |
//SUPPORT REP ID SHOULD BE 0 for NEW customer | |
SupportRepID: null, | |
PersonID: null, | |
CustomerID: null | |
}; | |
var Blank_Track = { | |
TrackId: null, | |
TrackName: null, | |
AlbumTitle: null, | |
MediaType: null, | |
Genre: null, | |
Composer: null, | |
Milliseconds: null, | |
Bytes: null, | |
UnitPrice: null, | |
}; | |
var Blank_Payment = { | |
//everyone needs cust id and type | |
CustomerId: null, | |
//types are strings | |
//"CC" = credit card | |
//"AP" = apple pay | |
//"GP" = google pay | |
Type: null, | |
//Token is needed if it's AP of GP | |
token: null, | |
//email only if it's GP | |
email: null, | |
//these two only if it's a CC | |
cardnum: null, | |
//expr_date needs to be a date type | |
//YYYY-MM-DD | |
expr_date: null, | |
//is_default is 0 for false, 1 for true | |
is_default: null, | |
PayId: null | |
} | |
//create the accessor for it | |
return { | |
getBlankCustomer: function () { | |
return Blank_Customer; | |
}, | |
getBlankTrack: function () { | |
return Blank_Track; | |
}, | |
getBlankPayment: function () { | |
return Blank_Payment; | |
} | |
}; | |
}); |