Initial commit — Southwest Roleplay FiveM

This commit is contained in:
jack
2026-06-20 13:05:34 +00:00
commit 3857de3d85
397 changed files with 30322 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { Column, Entity, Index, JoinColumn, ManyToOne, PrimaryGeneratedColumn, Unique } from 'typeorm';
import { PropertyEntity } from './property.entity';
import { ItemTypeEntity } from './item-type.entity';
@Entity('business_stock_levels')
@Unique(['property_id', 'item_type_id'])
export class BusinessStockLevelEntity {
@PrimaryGeneratedColumn()
id: number;
@Index()
@Column()
property_id: number;
@Column()
item_type_id: number;
@Column({ type: 'int', default: 0 })
quantity: number;
@Column({ type: 'int', default: 0 })
min_threshold: number;
@ManyToOne(() => PropertyEntity, { onDelete: 'CASCADE' })
@JoinColumn({ name: 'property_id' })
property: PropertyEntity;
@ManyToOne(() => ItemTypeEntity)
@JoinColumn({ name: 'item_type_id' })
itemType: ItemTypeEntity;
}