add: change implement enum and distribution
This commit is contained in:
@@ -1,28 +1,9 @@
|
||||
import {
|
||||
Entity,
|
||||
Column,
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
DeleteDateColumn,
|
||||
VersionColumn,
|
||||
CreateDateColumn,
|
||||
ManyToOne,
|
||||
ManyToMany,
|
||||
JoinTable,
|
||||
} from 'typeorm';
|
||||
import { Product } from '../../product/entities/product.entity';
|
||||
import { User } from '../../users/entities/user.entity';
|
||||
import { BaseModel } from '../../config/basemodel.entity';
|
||||
|
||||
enum type {
|
||||
SYSTEM_BANk,
|
||||
INCOME,
|
||||
}
|
||||
|
||||
enum balanceType {
|
||||
DEBIT,
|
||||
CREDIT,
|
||||
}
|
||||
import { coaType, balanceType } from '../../helper/enum-list';
|
||||
|
||||
@Entity()
|
||||
export class COA extends BaseModel {
|
||||
@@ -30,7 +11,7 @@ export class COA extends BaseModel {
|
||||
name: string;
|
||||
|
||||
@Column('text')
|
||||
type: type;
|
||||
type: coaType;
|
||||
|
||||
@Column('text')
|
||||
balanceType: balanceType;
|
||||
@@ -38,7 +19,6 @@ export class COA extends BaseModel {
|
||||
@Column()
|
||||
amount: number;
|
||||
|
||||
@ManyToMany(() => User)
|
||||
@JoinTable()
|
||||
user: User[];
|
||||
@Column()
|
||||
user: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user