mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 13:51:08 +10:00
Replace space privacy with visibility
* Make creatorId nullable
This commit is contained in:
@ -13,7 +13,7 @@ import { User } from '../../user/entities/user.entity';
|
||||
import { Workspace } from '../../workspace/entities/workspace.entity';
|
||||
import { SpaceUser } from './space-user.entity';
|
||||
import { Page } from '../../page/entities/page.entity';
|
||||
import { SpacePrivacy, SpaceRole } from '../../../helpers/types/permission';
|
||||
import { SpaceVisibility, SpaceRole } from '../../../helpers/types/permission';
|
||||
import { SpaceGroup } from './space-group.entity';
|
||||
|
||||
@Entity('spaces')
|
||||
@ -34,13 +34,13 @@ export class Space {
|
||||
@Column({ length: 255, nullable: true })
|
||||
icon: string;
|
||||
|
||||
@Column({ length: 100, default: SpacePrivacy.OPEN })
|
||||
privacy: string;
|
||||
@Column({ length: 100, default: SpaceVisibility.OPEN })
|
||||
visibility: string;
|
||||
|
||||
@Column({ length: 100, default: SpaceRole.WRITER })
|
||||
defaultRole: string;
|
||||
|
||||
@Column()
|
||||
@Column({ nullable: true })
|
||||
creatorId: string;
|
||||
|
||||
@ManyToOne(() => User)
|
||||
|
||||
@ -52,9 +52,9 @@ export class Workspace {
|
||||
@Column({ nullable: true, type: 'uuid' })
|
||||
creatorId: string;
|
||||
|
||||
//@ManyToOne(() => User, (user) => user.workspaces)
|
||||
// @JoinColumn({ name: 'creatorId' })
|
||||
// creator: User;
|
||||
@OneToOne(() => User)
|
||||
@JoinColumn({ name: 'creatorId' })
|
||||
creator: User;
|
||||
|
||||
@Column({ nullable: true })
|
||||
defaultSpaceId: string;
|
||||
|
||||
Reference in New Issue
Block a user