user groups - first steps
This commit is contained in:
		
							parent
							
								
									63d9baa186
								
							
						
					
					
						commit
						d3682e4c21
					
				
							
								
								
									
										44
									
								
								util/src/entities/UserGroup.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								util/src/entities/UserGroup.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,44 @@ | ||||
| import { Column, Entity, JoinColumn, ManyToOne, RelationId } from "typeorm"; | ||||
| 
 | ||||
| import { BaseClass } from "./BaseClass"; | ||||
| import { Guild } from "./Guild"; | ||||
| import { User } from "./User"; | ||||
| 
 | ||||
| @Entity("groups") | ||||
| export class UserGroup extends BaseClass { | ||||
| 	@Column() | ||||
| 	color: number; | ||||
| 
 | ||||
| 	@Column() | ||||
| 	hoist: boolean; | ||||
| 	 | ||||
| 	@JoinColumn({ name: "controller", referencedColumnName: "id" }) | ||||
| 	@ManyToOne(() => User) | ||||
| 	controller?: User; | ||||
| 	  | ||||
| 	@Column() | ||||
| 	mentionable_by?: string; | ||||
| 
 | ||||
| 	@Column() | ||||
| 	name: string; | ||||
| 
 | ||||
| 	@Column() | ||||
| 	rights: string; | ||||
| 
 | ||||
| 	@Column({ nullable: true }) | ||||
| 	icon: string; | ||||
| 
 | ||||
| 	@Column({ type: "simple-json", nullable: true }) | ||||
| 	tags?: { | ||||
| 		bot_id?: string; | ||||
| 		integration_id?: string; | ||||
| 		premium_subscriber?: boolean; | ||||
| 	}; | ||||
| 	 | ||||
| 	@Column({ nullable: true }) | ||||
| 	parent?: string; | ||||
| 	 | ||||
| 	@Column({ type: "simple-array", nullable: true}) | ||||
| 	associciations: string[]; | ||||
| 
 | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Erkin Alp Güney
						Erkin Alp Güney