import { Column, Entity, JoinColumn, ManyToOne } from "typeorm" import { Club } from "./club" import { DbAwareColumn, Product as MedusaProduct } from "@medusajs/medusa" import { Locations } from "../types/common" import { UltimateEntity } from "medusa-plugin-ultimate/dist/index" import { Artist } from "./artist" import { University } from "./university" @UltimateEntity({ hidden: true, isBuiltInEntity: true, }) @Entity() export class Product extends MedusaProduct { @Column({ type: "timestamptz", nullable: true }) event_datetime: string | null @Column({ default: false }) hot_ticket: boolean @Column({ default: false }) special_banner_event: boolean @Column({ default: false }) show_banner_event: boolean @Column({ type: "text", nullable: true }) event_address: string | null @Column({ type: "text", nullable: true }) event_flow: string | null @DbAwareColumn({ type: "enum", enum: Locations, nullable: true, default: null, }) event_short_address: Locations @Column({ type: "text", nullable: true }) club_id: string | null @ManyToOne(() => Club) @JoinColumn({ name: "club_id" }) club: Club @Column({ type: "text", nullable: true }) artist_id: string | null @ManyToOne(() => Artist) @JoinColumn({ name: "artist_id" }) artist: Artist @Column({ type: "text", nullable: true }) university_id: string | null @ManyToOne(() => University) @JoinColumn({ name: "university_id" }) university: University }