sequelize-ts-boilerplate
Version:
A REST API scaffolding tool designed to scale and easily generate CRUD endpoints based on database schema design
54 lines • 2.84 kB
JavaScript
;
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 });
const sequelize_typescript_1 = require("sequelize-typescript");
/*** ref imports here ***/
const NotificationRequest_1 = require("./NotificationRequest");
const Lookup_1 = require("./Lookup");
let NotificationFormat = class NotificationFormat extends sequelize_typescript_1.Model {
};
__decorate([
sequelize_typescript_1.PrimaryKey,
sequelize_typescript_1.AutoIncrement,
sequelize_typescript_1.Column({ field: 'Oid' }),
__metadata("design:type", Number)
], NotificationFormat.prototype, "oid", void 0);
__decorate([
sequelize_typescript_1.ForeignKey(() => NotificationRequest_1.NotificationRequest),
sequelize_typescript_1.Column({ field: 'NotificationRequestOid' }),
__metadata("design:type", Number)
], NotificationFormat.prototype, "notificationRequestOid", void 0);
__decorate([
sequelize_typescript_1.Column({ field: 'lkpNotificationFrequencyOid' }),
__metadata("design:type", Number)
], NotificationFormat.prototype, "lkpNotificationFrequencyOid", void 0);
__decorate([
sequelize_typescript_1.BelongsTo(() => Lookup_1.Lookup, "lkpNotificationFrequencyOid") // extra, non-column prop for Lookup
,
__metadata("design:type", Lookup_1.Lookup)
], NotificationFormat.prototype, "lkpNotificationFrequency", void 0);
__decorate([
sequelize_typescript_1.Column({ field: 'WebSocket' }),
__metadata("design:type", Boolean)
], NotificationFormat.prototype, "webSocket", void 0);
__decorate([
sequelize_typescript_1.Column({ field: 'Email' }),
__metadata("design:type", Boolean)
], NotificationFormat.prototype, "email", void 0);
__decorate([
sequelize_typescript_1.Column({ field: 'SMS' }),
__metadata("design:type", Boolean)
], NotificationFormat.prototype, "sMS", void 0);
NotificationFormat = __decorate([
sequelize_typescript_1.Table({ tableName: "NotificationFormat" })
], NotificationFormat);
exports.NotificationFormat = NotificationFormat;
//# sourceMappingURL=NotificationFormat.js.map