Initial commit - Event Planner application
This commit is contained in:
22
dist/gift/entities/gift.entity.d.ts
vendored
Normal file
22
dist/gift/entities/gift.entity.d.ts
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { EntitySchema } from '@mikro-orm/core';
|
||||
import { BaseEntity } from '../../core/entities/base.entity';
|
||||
export declare class Gift extends BaseEntity {
|
||||
name: string;
|
||||
description?: string;
|
||||
imageUrl?: string;
|
||||
price?: number;
|
||||
experience?: boolean;
|
||||
status: string;
|
||||
ownerId?: string;
|
||||
}
|
||||
export declare const GiftSchema: EntitySchema<Gift, never, import("@mikro-orm/core").EntityCtor<Gift>>;
|
||||
export declare class GiftContribution extends BaseEntity {
|
||||
giftId: string;
|
||||
contributorName: string;
|
||||
contributorEmail?: string;
|
||||
amount: number;
|
||||
type: string;
|
||||
status: string;
|
||||
}
|
||||
export declare const GiftContributionSchema: EntitySchema<GiftContribution, never, import("@mikro-orm/core").EntityCtor<GiftContribution>>;
|
||||
//# sourceMappingURL=gift.entity.d.ts.map
|
||||
1
dist/gift/entities/gift.entity.d.ts.map
vendored
Normal file
1
dist/gift/entities/gift.entity.d.ts.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"gift.entity.d.ts","sourceRoot":"","sources":["../../../src/gift/entities/gift.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE7D,qBAAa,IAAK,SAAQ,UAAU;IAClC,IAAI,EAAG,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,MAAM,CAAa;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,UAAU,uEAoDrB,CAAC;AAEH,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,MAAM,EAAG,MAAM,CAAC;IAChB,eAAe,EAAG,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAG,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAgB;IAC5B,MAAM,EAAE,MAAM,CAAa;CAC5B;AAED,eAAO,MAAM,sBAAsB,+FA8CjC,CAAC"}
|
||||
121
dist/gift/entities/gift.entity.js
vendored
Normal file
121
dist/gift/entities/gift.entity.js
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.GiftContributionSchema = exports.GiftContribution = exports.GiftSchema = exports.Gift = void 0;
|
||||
const core_1 = require("@mikro-orm/core");
|
||||
const uuid_1 = require("uuid");
|
||||
const base_entity_1 = require("../../core/entities/base.entity");
|
||||
class Gift extends base_entity_1.BaseEntity {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.status = 'pending';
|
||||
}
|
||||
}
|
||||
exports.Gift = Gift;
|
||||
exports.GiftSchema = new core_1.EntitySchema({
|
||||
class: Gift,
|
||||
tableName: 'gifts',
|
||||
properties: {
|
||||
id: {
|
||||
type: 'uuid',
|
||||
primary: true,
|
||||
default: (0, uuid_1.v4)(),
|
||||
},
|
||||
tenantId: {
|
||||
type: 'string',
|
||||
},
|
||||
metadata: {
|
||||
type: 'json',
|
||||
nullable: true,
|
||||
},
|
||||
createdAt: {
|
||||
type: 'date',
|
||||
default: new Date(),
|
||||
},
|
||||
updatedAt: {
|
||||
type: 'date',
|
||||
default: new Date(),
|
||||
},
|
||||
name: {
|
||||
type: 'string',
|
||||
},
|
||||
description: {
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
},
|
||||
imageUrl: {
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
},
|
||||
price: {
|
||||
type: 'float',
|
||||
nullable: true,
|
||||
},
|
||||
experience: {
|
||||
type: 'boolean',
|
||||
nullable: true,
|
||||
},
|
||||
status: {
|
||||
type: 'string',
|
||||
default: 'pending',
|
||||
},
|
||||
ownerId: {
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
class GiftContribution extends base_entity_1.BaseEntity {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.type = 'individual';
|
||||
this.status = 'pending';
|
||||
}
|
||||
}
|
||||
exports.GiftContribution = GiftContribution;
|
||||
exports.GiftContributionSchema = new core_1.EntitySchema({
|
||||
class: GiftContribution,
|
||||
tableName: 'gift_contributions',
|
||||
properties: {
|
||||
id: {
|
||||
type: 'uuid',
|
||||
primary: true,
|
||||
default: (0, uuid_1.v4)(),
|
||||
},
|
||||
tenantId: {
|
||||
type: 'string',
|
||||
},
|
||||
metadata: {
|
||||
type: 'json',
|
||||
nullable: true,
|
||||
},
|
||||
createdAt: {
|
||||
type: 'date',
|
||||
default: new Date(),
|
||||
},
|
||||
updatedAt: {
|
||||
type: 'date',
|
||||
default: new Date(),
|
||||
},
|
||||
giftId: {
|
||||
type: 'uuid',
|
||||
},
|
||||
contributorName: {
|
||||
type: 'string',
|
||||
},
|
||||
contributorEmail: {
|
||||
type: 'string',
|
||||
nullable: true,
|
||||
},
|
||||
amount: {
|
||||
type: 'float',
|
||||
},
|
||||
type: {
|
||||
type: 'string',
|
||||
default: 'individual',
|
||||
},
|
||||
status: {
|
||||
type: 'string',
|
||||
default: 'pending',
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user