hedgedoc/lib/models/temp.ts
David Mehren 1d4107fe90
Migrate models to TypeScript
Co-authored-by: David Mehren <dmehren1@gmail.com>
Co-authored-by: Yannick Bungers <git@innay.de>
Co-authored-by: Philipp Hochkamp <me@phochkamp.de>
Co-authored-by: nzbr <mail@nzbr.de>

Signed-off-by: David Mehren <dmehren1@gmail.com>
2020-04-25 16:04:01 +02:00

13 lines
347 B
TypeScript

import { DataType, Model, Table, PrimaryKey, Column, Default } from 'sequelize-typescript'
import { generate as shortIdGenerate, isValid as shortIdIsValid } from "shortid";
@Table
export class Temp extends Model<Temp> {
@Default(shortIdGenerate)
@PrimaryKey
@Column(DataType.STRING)
id: string;
@Column(DataType.TEXT)
data: string
}