snowballtools-base/packages/backend/src/entity/User.ts
Nabarun Gogoi 6d1a48905a
Show domain connected status in overview tab (#58)
* Implement functionality to visit deployment

* Check and display domain details in overview tab for production branch

* Update fixtures to remove project name from deployment url

* Refactor and add uuid to typeorm entities

* Fix deployment url

* Display live domain details in project overview

* Use database query to fetch live production domain
2024-02-06 19:11:53 +05:30

47 lines
982 B
TypeScript

import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
OneToMany,
Unique
} from 'typeorm';
import { ProjectMember } from './ProjectMember';
import { UserOrganization } from './UserOrganization';
@Entity()
@Unique(['email'])
export class User {
@PrimaryGeneratedColumn('uuid')
id!: string;
@Column('varchar', { length: 255, nullable: true })
name!: string | null;
@Column()
email!: string;
@Column('varchar', { nullable: true })
gitHubToken!: string | null;
@Column('boolean', { default: false })
isVerified!: boolean;
@CreateDateColumn()
createdAt!: Date;
@CreateDateColumn()
updatedAt!: Date;
@OneToMany(() => ProjectMember, projectMember => projectMember.project, {
cascade: ['soft-remove']
})
projectMembers!: ProjectMember[];
@OneToMany(() => UserOrganization, UserOrganization => UserOrganization.member, {
cascade: ['soft-remove']
})
userOrganizations!: UserOrganization[];
}