UNPKG

sequelize-ts-boilerplate

Version:

A REST API scaffolding tool designed to scale and easily generate CRUD endpoints based on database schema design

107 lines 4.67 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 }); const sequelize_typescript_1 = require("sequelize-typescript"); /*** ref imports here ***/ const Village_1 = require("./Village"); const Company_1 = require("./Company"); const User_1 = require("./User"); let Child = class Child extends sequelize_typescript_1.Model { }; __decorate([ sequelize_typescript_1.PrimaryKey, sequelize_typescript_1.AutoIncrement, sequelize_typescript_1.Column({ field: 'id' }), __metadata("design:type", Number) ], Child.prototype, "id", void 0); __decorate([ sequelize_typescript_1.ForeignKey(() => User_1.User), sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'supervisorUserId' }), __metadata("design:type", Number) ], Child.prototype, "supervisorUserId", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'name' }), __metadata("design:type", String) ], Child.prototype, "name", void 0); __decorate([ sequelize_typescript_1.ForeignKey(() => Company_1.Company), sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'companyId' }), __metadata("design:type", Number) ], Child.prototype, "companyId", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'outsideSystemId' }), __metadata("design:type", Number) ], Child.prototype, "outsideSystemId", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'outsideSystemId2' }), __metadata("design:type", Number) ], Child.prototype, "outsideSystemId2", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'outsideSystemNo' }), __metadata("design:type", String) ], Child.prototype, "outsideSystemNo", void 0); __decorate([ sequelize_typescript_1.ForeignKey(() => Village_1.Village), sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'villageId' }), __metadata("design:type", Number) ], Child.prototype, "villageId", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'consGender' }), __metadata("design:type", String) ], Child.prototype, "consGender", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'avatar' }), __metadata("design:type", String) ], Child.prototype, "avatar", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'json' }), __metadata("design:type", String) ], Child.prototype, "json", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'lastSurveyDate' }), __metadata("design:type", Date) ], Child.prototype, "lastSurveyDate", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'lastCheckupDate' }), __metadata("design:type", Date) ], Child.prototype, "lastCheckupDate", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'childStatus' }), __metadata("design:type", String) ], Child.prototype, "childStatus", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'lastSurveyJson' }), __metadata("design:type", String) ], Child.prototype, "lastSurveyJson", void 0); __decorate([ sequelize_typescript_1.AllowNull, sequelize_typescript_1.Column({ field: 'lastCheckupJson' }), __metadata("design:type", String) ], Child.prototype, "lastCheckupJson", void 0); Child = __decorate([ sequelize_typescript_1.Table({ tableName: "child" }) ], Child); exports.Child = Child; //# sourceMappingURL=Child.js.map