api apikeyhistory

This commit is contained in:
kittapath 2024-12-04 21:18:10 +07:00
parent f7653aa4cf
commit 62f803f3e3
5 changed files with 87 additions and 2 deletions

View file

@ -1,6 +1,7 @@
import { Entity, Column, ManyToMany, JoinTable } from "typeorm";
import { Entity, Column, ManyToMany, JoinTable, OneToMany } from "typeorm";
import { EntityBase } from "./base/Base";
import { ApiKey } from "./ApiKey";
import { ApiHistory } from "./ApiHistory";
@Entity("apiName")
export class ApiName extends EntityBase {
@ -31,4 +32,7 @@ export class ApiName extends EntityBase {
@ManyToMany(() => ApiKey, (apiKey) => apiKey.apiNames)
@JoinTable()
apiKeys: ApiKey[];
@OneToMany(() => ApiHistory, (v) => v.apiName)
apiHistorys: ApiHistory[];
}