arti-angular-app/src/app/asset-calculator/assets/asset.ts

46 lines
1.0 KiB
TypeScript

export enum TypeDepreciation{
linear, digressive
}
export interface Asset {
initialValueAsset : number ;
depreciationRate : number ;
type : TypeDepreciation;
year : number;
month : number;
factorValue : number;
/*
constructor( initialValueAsset : number,
depreciationRate : number,
typeDepreciation : TypeDepreciation,
year : number,
month: number,
factorValue: number ){
this.initialValueAsset = initialValueAsset;
this.depreciationRate = depreciationRate;
this.type = typeDepreciation;
this.year = year;
this.month = month;
this.factorValue = factorValue;
}
*/
}
export class YearMonth{
year : number = 0;
month :number = 0;
}
export class AssetPlanPosition{
when : YearMonth = new YearMonth();
calculatedDepreciation : number = 0;
sum:number = 0;
}
export class Positions {
positions : AssetPlanPosition[]=[];
}