echadospalante-domain
Version:
This package contains the core of the echadospalante project, it contains the domain entities, helpers, and other utilities that are shared between the different services.
57 lines (56 loc) • 1.4 kB
TypeScript
import { EventDonation } from "../contributions";
import { Venture } from "../ventures";
import { EventCategory } from "./event-category";
import { EventContact } from "./event-contact";
import { EventLocation } from "./event-location";
export interface VentureEvent {
id: string;
title: string;
slug: string;
description: string;
donationsCount: number;
totalDonations: number;
coverPhoto: string;
venture?: Venture;
location: EventLocation;
contact: EventContact;
categories: EventCategory[];
donations: EventDonation[];
datesAndHours: {
date: string;
workingRanges: {
start: string;
end: string;
}[];
}[];
createdAt: Date;
updatedAt: Date;
}
export interface EventCreate {
title: string;
description: string;
coverPhoto: string;
categoriesIds: string[];
contactEmail: string;
contactPhoneNumber: string;
municipalityId: number;
locationLat: string;
locationLng: string;
datesAndHours: DatesAndHour[];
locationDescription: string;
}
export interface DatesAndHour {
date: string;
workingRanges: WorkingRange[];
}
export interface WorkingRange {
start: string;
end: string;
}
export interface EventUpdate {
coverPhoto: string;
location: EventLocation;
categoriesIds: string[];
startDate: Date;
endDate: Date;
}