import { BaseEntity , Column , Entity , JoinTable , ManyToMany , PrimaryGeneratedColumn } from 'typeorm' ; import { Permission } from './permission.entity' ; export class @ Entity ( ) export class Group extends BaseEntity { @ PrimaryGeneratedColumn ( ) id : number ; @ Column ( { length : 80 } ) name : string ; @ Column ( { length : 100 , unique : true } ) codeName : string ; @ ManyToMany ( type => Permission ) @ JoinTable ( ) permissions : Permission [ ] ; }