import { PrimaryGeneratedColumn, ManyToMany, Relation, Entity, Column, Unique } from "typeorm"
import { Feed } from "./Feed.js";

@Entity()
@Unique("chatid", ["chatid"])
export class User {
   @PrimaryGeneratedColumn()
   id: number;

   @Column()
   chatid: number;

   @ManyToMany(() => Feed, feed => feed.subscriber)
   feeds: Relation<Feed>[];
}