first commit
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
class ReserveResultPojo {
|
||||
constructor(id, phoneNumber, passportNumber, mail, lastName, firstName, storeType, url) {
|
||||
this.id = id;
|
||||
this.phoneNumber = phoneNumber;
|
||||
this.passportNumber = passportNumber;
|
||||
this.firstName = firstName;
|
||||
this.lastName = lastName;
|
||||
this.storeType = storeType;
|
||||
this.url = url;
|
||||
this.mail = mail;
|
||||
}
|
||||
|
||||
to_mongo_dict() {
|
||||
return {
|
||||
id: this.id,
|
||||
phone: this.phoneNumber,
|
||||
firstName: this.firstName,
|
||||
lastName: this.lastName,
|
||||
email: this.mail,
|
||||
passport: this.passportNumber,
|
||||
url: this.url,
|
||||
store_type: this.storeType
|
||||
}
|
||||
}
|
||||
|
||||
static create_from_contact(contactPojo, id, url, storeType) {
|
||||
return new ReserveResultPojo(id, contactPojo.phoneNumber, contactPojo.passportNumber, contactPojo.mail, contactPojo.lastName, contactPojo.firstName, storeType, url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = ReserveResultPojo
|
||||
Reference in New Issue
Block a user