mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
feat: import sheet files on initializing demo account
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
|
||||
|
||||
|
||||
export class SeedDemoAbstract{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
import { SeedDemoAbstract } from './SeedDemoAbstract';
|
||||
|
||||
export class SeedDemoAccountItems extends SeedDemoAbstract {
|
||||
/**
|
||||
* Retrieves the seeder file mapping.
|
||||
*/
|
||||
get mapping() {
|
||||
return [
|
||||
{ from: 'Item Type', to: 'type' },
|
||||
{ from: 'Item Name', to: 'name' },
|
||||
{ from: 'Item Code', to: 'code' },
|
||||
{ from: 'Sellable', to: 'sellable' },
|
||||
{ from: 'Purchasable', to: 'purchasable' },
|
||||
{ from: 'Sell Price', to: 'sellPrice' },
|
||||
{ from: 'Cost Price', to: 'cost_price' },
|
||||
{ from: 'Cost Account', to: 'costAccount' },
|
||||
{ from: 'Sell Account', to: 'sellAccount' },
|
||||
{ from: 'Inventory Account', to: 'inventoryAccount' },
|
||||
{ from: 'Sell Description', to: 'sellDescription' },
|
||||
{ from: 'Purchase Description', to: 'purchaseDescription' },
|
||||
{ from: 'Note', to: 'note' },
|
||||
{ from: 'Category', to: 'category' },
|
||||
{ from: 'Active', to: 'active' },
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the seeder file name.
|
||||
* @returns {string}
|
||||
*/
|
||||
get importFileName() {
|
||||
return `items.csv`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the resource name of the seeder.
|
||||
* @returns {string}
|
||||
*/
|
||||
get resource() {
|
||||
return 'Item';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user