feat: estimation play to item

fix/bug-firman
shancheas 2024-08-16 16:44:04 +07:00
parent ee232447b6
commit 8b82f9b7db
4 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddEstimationToItem1723801180604 implements MigrationInterface {
name = 'AddEstimationToItem1723801180604';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "items" ADD "play_estimation" integer`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "items" DROP COLUMN "play_estimation"`,
);
}
}

View File

@ -50,6 +50,9 @@ export class ItemModel
@Column('bigint', { name: 'base_price', nullable: true }) @Column('bigint', { name: 'base_price', nullable: true })
base_price: number; base_price: number;
@Column('int', { name: 'play_estimation', nullable: true })
play_estimation: number;
@Column('boolean', { name: 'use_queue', default: false }) @Column('boolean', { name: 'use_queue', default: false })
use_queue: boolean; use_queue: boolean;

View File

@ -48,6 +48,7 @@ export class DetailItemManager extends BaseDetailManager<ItemEntity> {
`${this.tableName}.use_queue`, `${this.tableName}.use_queue`,
`${this.tableName}.show_to_booking`, `${this.tableName}.show_to_booking`,
`${this.tableName}.breakdown_bundling`, `${this.tableName}.breakdown_bundling`,
`${this.tableName}.play_estimation`,
`item_category.id`, `item_category.id`,
`item_category.name`, `item_category.name`,

View File

@ -47,6 +47,7 @@ export class IndexItemManager extends BaseIndexManager<ItemEntity> {
`${this.tableName}.base_price`, `${this.tableName}.base_price`,
`${this.tableName}.share_profit`, `${this.tableName}.share_profit`,
`${this.tableName}.breakdown_bundling`, `${this.tableName}.breakdown_bundling`,
`${this.tableName}.play_estimation`,
`item_category.id`, `item_category.id`,
`item_category.name`, `item_category.name`,