mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
39 lines
759 B
TypeScript
39 lines
759 B
TypeScript
|
import {
|
||
|
AllowNull, AutoIncrement, BelongsTo, Column, ForeignKey, Model, PrimaryKey,
|
||
|
Table
|
||
|
} from "sequelize-typescript";
|
||
|
import User from "./User";
|
||
|
import Upstream from "./Upstream";
|
||
|
|
||
|
@Table({
|
||
|
tableName: "dimension_scalar_tokens",
|
||
|
underscoredAll: false,
|
||
|
timestamps: false,
|
||
|
})
|
||
|
export default class UserScalarToken extends Model<UserScalarToken> {
|
||
|
@PrimaryKey
|
||
|
@AutoIncrement
|
||
|
@Column
|
||
|
id: number;
|
||
|
|
||
|
@Column
|
||
|
@ForeignKey(() => User)
|
||
|
userId: string;
|
||
|
|
||
|
@BelongsTo(() => User)
|
||
|
user: User;
|
||
|
|
||
|
@Column
|
||
|
scalarToken: string;
|
||
|
|
||
|
@Column
|
||
|
isDimensionToken: boolean;
|
||
|
|
||
|
@AllowNull
|
||
|
@Column
|
||
|
@ForeignKey(() => Upstream)
|
||
|
upstreamId?: number;
|
||
|
|
||
|
@BelongsTo(() => Upstream)
|
||
|
upstream: Upstream;
|
||
|
}
|