api apikeyhistory
This commit is contained in:
parent
f7653aa4cf
commit
62f803f3e3
5 changed files with 87 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { Entity, Column, ManyToOne, JoinColumn } from "typeorm";
|
||||
import { EntityBase } from "./base/Base";
|
||||
import { ApiKey } from "./ApiKey";
|
||||
import { ApiName } from "./ApiName";
|
||||
|
||||
@Entity("apiHistory")
|
||||
export class ApiHistory extends EntityBase {
|
||||
|
|
@ -63,4 +64,16 @@ export class ApiHistory extends EntityBase {
|
|||
@ManyToOne(() => ApiKey, (apiKey) => apiKey.apiHistorys)
|
||||
@JoinColumn({ name: "apiKeyId" })
|
||||
apiKey: ApiKey;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "คีย์นอก(FK)ของตาราง ApiName",
|
||||
default: null,
|
||||
})
|
||||
apiNameId: string;
|
||||
|
||||
@ManyToOne(() => ApiName, (apiName) => apiName.apiHistorys)
|
||||
@JoinColumn({ name: "apiNameId" })
|
||||
apiName: ApiName;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue