Socialify

Folder ..

Viewing FribbMapping.ts
56 lines (41 loc) • 1.2 KB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, Index } from "typeorm";

@Entity()
export class FribbMapping {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({ nullable: true, unique: true })
    @Index()
    livechart_id: number;

    @Column({ nullable: true })
    thetvdb_id: number;

    @Column({ name: "anime_planet_id", nullable: true })
    "anime-planet_id": string;

    @Column({ nullable: true })
    imdb_id: string;

    @Column({ nullable: true })
    anisearch_id: number;

    @Column({ nullable: true })
    themoviedb_id: number;

    @Column({ nullable: true })
    anidb_id: number;

    @Column({ nullable: true })
    kitsu_id: number;

    @Column({ nullable: true })
    @Index()
    mal_id: number;

    @Column()
    type: string;

    @Column({ name: "notify_moe_id", nullable: true })
    "notify.moe_id": string;

    @Column({ nullable: true })
    @Index()
    anilist_id: number;

    @CreateDateColumn()
    created_at: Date;

    @UpdateDateColumn()
    updated_at: Date;

    // We'll add composite unique constraints for the IDs we want to ensure uniqueness
    @Index()
    @Column({ nullable: true, unique: true })
    mal_anilist_composite: string;
}