Dataset.ts
489 Bytes
import {
Entity,
CreateDateColumn,
PrimaryGeneratedColumn,
Column,
ManyToMany,
ManyToOne,
EntityOptions,
OneToMany,
OneToOne
} from "typeorm";
import User from "./User";
import Drone from "./Drone";
import Org from "./Org";
@Entity("datasets")
export default class Dataset {
@PrimaryGeneratedColumn() id: string;
@Column() comment: string;
@ManyToOne(type => Drone)
producer: Drone;
@ManyToMany(type => User, user => user.datasets)
buyers: Array<User>;
}