extend api table by id
This commit is contained in:
parent
26d2f288e9
commit
ca6dbafaf1
3 changed files with 14 additions and 9 deletions
|
@ -2,7 +2,10 @@ import { Column, CreateDateColumn, Entity, PrimaryColumn } from "typeorm";
|
|||
|
||||
@Entity()
|
||||
export class api {
|
||||
@PrimaryColumn({ type: "varchar", length: 255 })
|
||||
@PrimaryColumn({ generated: "increment", type: "int" })
|
||||
id: number;
|
||||
|
||||
@Column({ type: "varchar", length: 255, unique: true, select: false })
|
||||
token: string;
|
||||
|
||||
@Column({ type: "varchar", length: 255 })
|
||||
|
|
|
@ -5,7 +5,7 @@ import { api } from "./api";
|
|||
@Entity()
|
||||
export class apiPermission {
|
||||
@PrimaryColumn({ type: "int" })
|
||||
apiToken: number;
|
||||
apiId: number;
|
||||
|
||||
@PrimaryColumn({ type: "varchar", length: 255 })
|
||||
permission: PermissionString;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue