forked from cerc-io/snowballtools-base
Nabarun Gogoi
6d1a48905a
* 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
48 lines
798 B
TypeScript
48 lines
798 B
TypeScript
import {
|
|
Entity,
|
|
Column,
|
|
CreateDateColumn,
|
|
UpdateDateColumn,
|
|
ManyToOne,
|
|
PrimaryGeneratedColumn,
|
|
JoinColumn,
|
|
DeleteDateColumn
|
|
} from 'typeorm';
|
|
|
|
import { User } from './User';
|
|
import { Organization } from './Organization';
|
|
|
|
enum Role {
|
|
Owner = 'Owner',
|
|
Maintainer = 'Maintainer',
|
|
Reader = 'Reader',
|
|
}
|
|
|
|
@Entity()
|
|
export class UserOrganization {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id!: string;
|
|
|
|
@ManyToOne(() => User)
|
|
@JoinColumn({ name: 'userId' })
|
|
member!: User;
|
|
|
|
@ManyToOne(() => Organization)
|
|
@JoinColumn({ name: 'organizationId' })
|
|
organization!: Organization;
|
|
|
|
@Column({
|
|
enum: Role
|
|
})
|
|
role!: Role;
|
|
|
|
@CreateDateColumn()
|
|
createdAt!: Date;
|
|
|
|
@UpdateDateColumn()
|
|
updatedAt!: Date;
|
|
|
|
@DeleteDateColumn()
|
|
deletedAt!: Date | null;
|
|
}
|