100 lines
2.2 KiB
TypeScript
100 lines
2.2 KiB
TypeScript
class CreateHouseCommand {
|
|
|
|
private _id : string;
|
|
private _title : string;
|
|
private _url : string;
|
|
private _neighborhood: string;
|
|
private _area : string;
|
|
private _rooms : string;
|
|
private _price : string;
|
|
private _description : string;
|
|
private _pic : string;
|
|
private _baths : string;
|
|
private _level : string;
|
|
private _phone : string;
|
|
|
|
|
|
private constructor() {
|
|
return this;
|
|
}
|
|
|
|
public static create(
|
|
id : string,
|
|
title : string,
|
|
url : string,
|
|
neighborhood: string,
|
|
area : string,
|
|
rooms : string,
|
|
price : string,
|
|
description : string,
|
|
pic : string,
|
|
baths : string,
|
|
level : string,
|
|
phone : string
|
|
) {
|
|
const createHouseCommand = new CreateHouseCommand();
|
|
createHouseCommand._id = id;
|
|
createHouseCommand._title = title;
|
|
createHouseCommand._url = url;
|
|
createHouseCommand._neighborhood = neighborhood;
|
|
createHouseCommand._area = area;
|
|
createHouseCommand._rooms = rooms;
|
|
createHouseCommand._price = price;
|
|
createHouseCommand._description = description;
|
|
createHouseCommand._pic = pic;
|
|
createHouseCommand._baths = baths;
|
|
createHouseCommand._level = level;
|
|
createHouseCommand._phone = phone;
|
|
|
|
return createHouseCommand;
|
|
}
|
|
|
|
public id() {
|
|
return this._id;
|
|
}
|
|
|
|
public title() {
|
|
return this._title;
|
|
}
|
|
|
|
public url() {
|
|
return this._url;
|
|
}
|
|
|
|
public neighborhood() {
|
|
return this._neighborhood;
|
|
}
|
|
|
|
public area() {
|
|
return this._area;
|
|
}
|
|
|
|
public rooms() {
|
|
return this._rooms;
|
|
}
|
|
|
|
public price() {
|
|
return this._price;
|
|
}
|
|
|
|
public description() {
|
|
return this._description;
|
|
}
|
|
|
|
public pic() {
|
|
return this._pic;
|
|
}
|
|
|
|
public baths() {
|
|
return this._baths;
|
|
}
|
|
|
|
public level() {
|
|
return this._level;
|
|
}
|
|
|
|
public phone() {
|
|
return this._phone;
|
|
}
|
|
|
|
} |