Files
SweetHome/app/enums/BuildingType.js
mouazkh 00ccf5f262
All checks were successful
Build frontend / build (push) Successful in 55s
the best in the west is mouaz
2026-05-25 21:27:39 +03:00

55 lines
1.4 KiB
JavaScript

/**
* BuildingType Enum
* Backend values are numeric (0-8)
* Used in: PropertyInformation.buildingType
*/
const BuildingType = Object.freeze({
APARTMENT: 0,
VILLA: 1,
SWEET: 2,
ROOM: 3,
STUDIO: 4,
OFFICE: 5,
FARMS: 6,
SHOP: 7,
WAREHOUSE: 8,
});
const BuildingTypeLabels = Object.freeze({
[BuildingType.APARTMENT]: 'شقة',
[BuildingType.VILLA]: 'فيلا',
[BuildingType.SWEET]: 'سويت',
[BuildingType.ROOM]: 'غرفة',
[BuildingType.STUDIO]: 'استوديو',
[BuildingType.OFFICE]: 'مكتب',
[BuildingType.FARMS]: 'مزرعة',
[BuildingType.SHOP]: 'متجر',
[BuildingType.WAREHOUSE]: 'مستودع',
});
const BuildingTypeKeys = Object.freeze({
[BuildingType.APARTMENT]: 'apartment',
[BuildingType.VILLA]: 'villa',
[BuildingType.SWEET]: 'sweet',
[BuildingType.ROOM]: 'room',
[BuildingType.STUDIO]: 'studio',
[BuildingType.OFFICE]: 'office',
[BuildingType.FARMS]: 'farms',
[BuildingType.SHOP]: 'shop',
[BuildingType.WAREHOUSE]: 'warehouse',
});
const BuildingTypeByKey = Object.freeze({
apartment: BuildingType.APARTMENT,
villa: BuildingType.VILLA,
sweet: BuildingType.SWEET,
room: BuildingType.ROOM,
studio: BuildingType.STUDIO,
office: BuildingType.OFFICE,
farms: BuildingType.FARMS,
shop: BuildingType.SHOP,
warehouse: BuildingType.WAREHOUSE,
});
export { BuildingType, BuildingTypeLabels, BuildingTypeKeys, BuildingTypeByKey };