echadospalante-core
Version:
This package contains the core of the echadospalante project, it contains the domain entities, helpers, and other utilities that are shared between the different services.
66 lines (50 loc) • 1.4 kB
text/typescript
import {
Column,
CreateDateColumn,
Entity,
JoinColumn,
JoinTable,
ManyToMany,
OneToOne,
PrimaryGeneratedColumn,
UpdateDateColumn,
} from "typeorm";
import { RoleData } from "./role.data";
import { UserContactData } from "./user-contact.data";
import { UserDetailData } from "./user-detail.data";
import { VentureCategoryData } from "./venture-category.data";
({ name: "user" })
export class UserData {
("uuid")
id: string;
()
picture: string;
({ unique: true })
email: string;
()
firstName: string;
()
lastName: string;
({ default: true })
active: boolean;
()
createdAt: Date;
()
updatedAt: Date;
({ default: false })
onboardingCompleted: boolean;
({ default: false })
verified: boolean;
(() => UserContactData, (contact) => contact.user)
({ name: "contactId" })
contact?: UserContactData;
(() => UserDetailData, (detail) => detail.user)
({ name: "detailId" })
detail?: UserDetailData;
(() => VentureCategoryData, (vc) => vc.users)
({ name: "x_user_preference" })
preferences: VentureCategoryData[];
(() => RoleData, (role) => role.users, { eager: true })
({ name: "x_user_role" })
roles: RoleData[];
}