mirror of
https://github.com/thedrewen/protojx-manager.git
synced 2026-03-21 09:48:56 +01:00
feat(database): refactor entities and relationships for service management
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { Column, Entity, JoinColumn, ManyToOne, PrimaryGeneratedColumn } from "typeorm";
|
||||
import { Service } from "./service.entity";
|
||||
|
||||
@Entity({name: 'follows'})
|
||||
export class Follow {
|
||||
@@ -8,8 +9,12 @@ export class Follow {
|
||||
@Column()
|
||||
user_discord: string;
|
||||
|
||||
@ManyToOne(() => Service, service => service.follows)
|
||||
@JoinColumn({name: 'serviceId'})
|
||||
service: Service;
|
||||
|
||||
@Column()
|
||||
host: string;
|
||||
serviceId: number;
|
||||
|
||||
@Column({default: false})
|
||||
enable: boolean;
|
||||
|
||||
Reference in New Issue
Block a user