import { slotModel, dateRangeModel, strictAddressModel } from 'store/appModels';
import { workspaceListModel, workspaceModel } from 'store/workspace/models';
import { accountModel } from 'store/account/models';

const bookingListModel = {
  _id: true,
  durationType: true,
  startToEnd: dateRangeModel,
  slot: slotModel,
  dates: dateRangeModel,
  capacity: true,
  comments: true,
  organisationId: true,
  workspace: workspaceListModel,
  status: true,
  room: {
    _id: true,
    organisationId: true,
    title: true,
    getAccounts: accountModel,
    getMessages: {
      _id: true,
      message: true,
      createdBy: true,
    },
    lastMessage: true,
  },
  ownerId: true,
  owner: accountModel,
  createdAt: true,
  updatedAt: true,
};

const bookingModel = {
  ...bookingListModel,
};

export { bookingListModel, bookingModel };
