This is part of a rewrite for Dimension to better support integrations. Only the bare minimum scalar APIs are implemented at this point - dimension is non-functional.
39 lines
No EOL
759 B
TypeScript
39 lines
No EOL
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;
|
|
} |