-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from cofinder-team/develop
release: v23.08.12
- Loading branch information
Showing
7 changed files
with
71 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Column, Entity, JoinColumn, ManyToOne, OneToOne } from 'typeorm'; | ||
import { ItemDetailEntity } from './detall.entity'; | ||
import { Model } from '../model.entity'; | ||
import { Item } from '../item.entity'; | ||
|
||
@Entity({ schema: 'macguider', name: 'item_iphone' }) | ||
export class ItemIphone extends ItemDetailEntity { | ||
@Column() | ||
modelSuffix: string; | ||
|
||
@Column() | ||
phoneStorage: string; | ||
|
||
@ManyToOne(() => Model, (model) => model.iphoneItems) | ||
@JoinColumn([ | ||
{ name: 'type', referencedColumnName: 'type' }, | ||
{ name: 'model', referencedColumnName: 'id' }, | ||
]) | ||
modelEntity: Model; | ||
|
||
@OneToOne(() => Item, (item) => item.iphone) | ||
@JoinColumn([ | ||
{ name: 'type', referencedColumnName: 'type' }, | ||
{ name: 'id', referencedColumnName: 'id' }, | ||
]) | ||
item: Item; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { FindOptionsRelations } from 'typeorm'; | ||
import { Item } from '../../entities'; | ||
import { ItemDetailEntity } from '../../entities/item/detall.entity'; | ||
|
||
const getItemDetailRelation = ( | ||
inner: FindOptionsRelations<ItemDetailEntity>, | ||
): FindOptionsRelations<Item> => ({ | ||
macbook: { ...inner }, | ||
ipad: { ...inner }, | ||
iphone: { ...inner }, | ||
}); | ||
|
||
export { getItemDetailRelation }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters