feat: add share profit to item
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
parent
cefeef8854
commit
50e8951b71
|
@ -0,0 +1,13 @@
|
|||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddItemProfit1723706764654 implements MigrationInterface {
|
||||
name = 'AddItemProfit1723706764654';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "items" ADD "share_profit" numeric`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "items" DROP COLUMN "share_profit"`);
|
||||
}
|
||||
}
|
|
@ -41,6 +41,9 @@ export class ItemModel
|
|||
@Column('decimal', { name: 'sales_margin', nullable: true })
|
||||
sales_margin: number;
|
||||
|
||||
@Column('decimal', { name: 'share_profit', nullable: true })
|
||||
share_profit: number;
|
||||
|
||||
@Column('bigint', { name: 'total_price', nullable: true })
|
||||
total_price: number;
|
||||
|
||||
|
|
|
@ -42,10 +42,12 @@ export class DetailItemManager extends BaseDetailManager<ItemEntity> {
|
|||
`${this.tableName}.limit_value`,
|
||||
`${this.tableName}.hpp`,
|
||||
`${this.tableName}.sales_margin`,
|
||||
`${this.tableName}.share_profit`,
|
||||
`${this.tableName}.total_price`,
|
||||
`${this.tableName}.base_price`,
|
||||
`${this.tableName}.use_queue`,
|
||||
`${this.tableName}.show_to_booking`,
|
||||
`${this.tableName}.show_to_booking`,
|
||||
|
||||
`item_category.id`,
|
||||
`item_category.name`,
|
||||
|
|
Loading…
Reference in New Issue