Skip to content

Instantly share code, notes, and snippets.

@Khuzha
Created August 23, 2021 12:33
Show Gist options
  • Save Khuzha/d5bbbe5bb90a9b009fc7971e48e771ca to your computer and use it in GitHub Desktop.
Save Khuzha/d5bbbe5bb90a9b009fc7971e48e771ca to your computer and use it in GitHub Desktop.
compiled from ts
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);
};
import { Table, Column, Model, AllowNull, Length, HasOne } from 'sequelize-typescript';
import Contact from './contact';
let ContactType = class ContactType extends Model {
};
__decorate([
AllowNull(false),
Length({ max: 16 }),
Column,
__metadata("design:type", String)
], ContactType.prototype, "title", void 0);
__decorate([
HasOne(() => Contact),
__metadata("design:type", Contact)
], ContactType.prototype, "contact", void 0);
ContactType = __decorate([
Table({
schema: 'objects',
modelName: 'contact_types',
timestamps: false
})
], ContactType);
export default ContactType;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment