import { ActivityInfoEntity } from "../../../activity/domain/entities/activity_info_entity"
import { ActivityModel } from "../../../activity/infrastructure/models/activity_model"

export const placeModelToEntity = (placeModel: ActivityModel): ActivityInfoEntity => {
    return {
        id: placeModel.idPlace,
        name: placeModel.name,
        imageUri: placeModel.imageName,
        description: placeModel.description,
        location: placeModel.coords,
        townId: placeModel.idTown,
        available: 'open',
        tags: placeModel.categories?.map(tag => tag.name) || undefined,
    }
}