feat: manual stack assets (#4198)

This commit is contained in:
shenlong
2023-10-22 02:38:07 +00:00
committed by GitHub
parent 5ead4af2dc
commit cf08ac7538
59 changed files with 2190 additions and 138 deletions

View File

@@ -148,6 +148,16 @@ export class AssetEntity {
@OneToMany(() => AssetFaceEntity, (assetFace) => assetFace.asset)
faces!: AssetFaceEntity[];
@Column({ nullable: true })
stackParentId?: string | null;
@ManyToOne(() => AssetEntity, (asset) => asset.stack, { nullable: true, onDelete: 'SET NULL', onUpdate: 'CASCADE' })
@JoinColumn({ name: 'stackParentId' })
stackParent?: AssetEntity | null;
@OneToMany(() => AssetEntity, (asset) => asset.stackParent)
stack?: AssetEntity[];
}
export enum AssetType {