Zylinder angefangen
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import {
|
||||
AfterLoad,
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
DeleteDateColumn,
|
||||
Entity,
|
||||
ManyToOne,
|
||||
OneToMany,
|
||||
@@ -29,4 +31,16 @@ export class Cylinder {
|
||||
|
||||
@UpdateDateColumn({ name: 'updatet_at' })
|
||||
updatedAt: Date;
|
||||
|
||||
@DeleteDateColumn()
|
||||
deletedAt: Date;
|
||||
|
||||
keyCount: number;
|
||||
|
||||
@AfterLoad()
|
||||
countKeys() {
|
||||
if (this.keys) {
|
||||
this.keyCount = this.keys.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,6 @@ export class RoleRepository extends Repository<Role> {
|
||||
}
|
||||
|
||||
getStandardRole(): Promise<Role> {
|
||||
return this.findOne({ where: { name: 'develop' } });
|
||||
return this.findOne({ where: { name: 'user' } });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user