UNPKG

echadospalante-core

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.

103 lines (102 loc) 4.36 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.VentureEventData = void 0; const typeorm_1 = require("typeorm"); const event_location_data_1 = require("./event-location.data"); const event_donation_data_1 = require("./event-donation.data"); const venture_detail_data_1 = require("./venture-detail.data"); const event_category_data_1 = require("./event-category.data"); const event_contact_data_1 = require("./event-contact.data"); let VentureEventData = class VentureEventData { id; title; description; coverPhoto; slug; ventureDetail; location; contact; categories; donations; startDate; endDate; createdAt; updatedAt; }; exports.VentureEventData = VentureEventData; __decorate([ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"), __metadata("design:type", String) ], VentureEventData.prototype, "id", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", String) ], VentureEventData.prototype, "title", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", String) ], VentureEventData.prototype, "description", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", String) ], VentureEventData.prototype, "coverPhoto", void 0); __decorate([ (0, typeorm_1.Column)({ type: "varchar", unique: true }), __metadata("design:type", String) ], VentureEventData.prototype, "slug", void 0); __decorate([ (0, typeorm_1.ManyToOne)(() => venture_detail_data_1.VentureDetailData, (ventureDetail) => ventureDetail.events), (0, typeorm_1.JoinColumn)({ name: "ventureId" }), __metadata("design:type", venture_detail_data_1.VentureDetailData) ], VentureEventData.prototype, "ventureDetail", void 0); __decorate([ (0, typeorm_1.JoinColumn)({ name: "locationId" }), (0, typeorm_1.OneToOne)(() => event_location_data_1.EventLocationData, (eventLocation) => eventLocation.event, { cascade: true, eager: true, }), __metadata("design:type", event_location_data_1.EventLocationData) ], VentureEventData.prototype, "location", void 0); __decorate([ (0, typeorm_1.JoinColumn)({ name: "contactId" }), (0, typeorm_1.OneToOne)(() => event_contact_data_1.EventContactData, (eventLocation) => eventLocation.event, { cascade: true, }), __metadata("design:type", event_contact_data_1.EventContactData) ], VentureEventData.prototype, "contact", void 0); __decorate([ (0, typeorm_1.ManyToMany)(() => event_category_data_1.EventCategoryData, (eventCategory) => eventCategory.events, { eager: true }), __metadata("design:type", Array) ], VentureEventData.prototype, "categories", void 0); __decorate([ (0, typeorm_1.OneToMany)(() => event_donation_data_1.EventDonationData, (eventDonation) => eventDonation.event), __metadata("design:type", Array) ], VentureEventData.prototype, "donations", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", Date) ], VentureEventData.prototype, "startDate", void 0); __decorate([ (0, typeorm_1.Column)(), __metadata("design:type", Date) ], VentureEventData.prototype, "endDate", void 0); __decorate([ (0, typeorm_1.CreateDateColumn)(), __metadata("design:type", Date) ], VentureEventData.prototype, "createdAt", void 0); __decorate([ (0, typeorm_1.UpdateDateColumn)(), __metadata("design:type", Date) ], VentureEventData.prototype, "updatedAt", void 0); exports.VentureEventData = VentureEventData = __decorate([ (0, typeorm_1.Entity)({ name: "venture_event" }) ], VentureEventData);