Breadbot/src/utilties/storage/entities/DBUser.ts

17 lines
385 B
TypeScript

import { Column, Entity, OneToMany, PrimaryColumn } from "typeorm";
import { DBMessage } from "./DBMessage";
@Entity()
export class DBUser {
@PrimaryColumn({type: "bigint"})
user_snowflake: string
@Column()
user_name: string
@Column()
user_displayname: string
@OneToMany(() => DBMessage, (message: DBMessage) => message.user)
messages: DBMessage[]
}