snowballtools-base/packages/backend/src/entity/UserOrganization.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

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;
}