You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
396 B
TypeScript
17 lines
396 B
TypeScript
5 years ago
|
import {Column, ForeignKey, Model, NotNull, Table} from "sequelize-typescript";
|
||
5 years ago
|
import {User} from "./User";
|
||
|
|
||
|
@Table({underscored: true})
|
||
|
export class Friendship extends Model<Friendship> {
|
||
|
|
||
|
@ForeignKey(() => User)
|
||
5 years ago
|
@NotNull
|
||
|
@Column({allowNull: false})
|
||
5 years ago
|
public userId: number;
|
||
|
|
||
|
@ForeignKey(() => User)
|
||
5 years ago
|
@NotNull
|
||
|
@Column({allowNull: false})
|
||
5 years ago
|
public friendId: number;
|
||
|
}
|