matrix-dimension/src-ts/db/models/AppServiceUser.ts
2017-12-24 02:03:02 -07:00

31 lines
646 B
TypeScript

import { AllowNull, BelongsTo, Column, ForeignKey, Model, PrimaryKey, Table } from "sequelize-typescript";
import AppService from "./AppService";
@Table({
tableName: "dimension_appservice_users",
underscoredAll: false,
timestamps: false,
})
export default class AppServiceUser extends Model<AppServiceUser> {
@PrimaryKey
@Column
id: string;
@Column
accessToken: string;
@AllowNull
@Column
avatarUrl?: string;
@AllowNull
@Column
displayName?: string;
@Column
@ForeignKey(() => AppService)
appserviceId: string;
@BelongsTo(() => AppService)
appservice: AppService;
}