Littlefish Feature Models

Shared domain models package for the littlefish merchant app. This package contains all common data models organized by domain, providing a single source of truth for model definitions across all feature packages.

Purpose

This package centralizes all domain models that are shared across multiple feature packages. Instead of duplicating models in each feature package, all packages reference this shared models package.

Structure

lib/
├── littlefish_feature_models.dart    # Main library file
└── models/
    ├── shared/                       # Shared utilities and base models
    │   ├── enums.dart
    │   ├── country.dart
    │   ├── form_field.dart
    │   └── ...
    ├── stock/                        # Stock/inventory models
    ├── customers/                    # Customer models
    ├── suppliers/                    # Supplier models
    ├── staff/                        # Employee models
    ├── store/                        # Business profile models
    ├── settings/                     # Settings and configuration models
    ├── tax/                          # Tax models
    ├── billing/                      # Billing models
    ├── expenses/                     # Expense models
    ├── finance/                      # Finance models
    ├── products/                     # Product models
    ├── promotions/                   # Promotion models
    ├── sales/                        # Sales models
    ├── reports/                      # Report models
    ├── analysis/                     # Analysis models
    ├── device/                       # Device models
    ├── security/                     # Security models
    ├── permissions/                  # Permission models
    ├── online/                       # Online store models
    ├── workspaces/                   # Workspace models
    ├── activation/                   # Activation models
    ├── assets/                       # Asset models
    └── cache/                        # Cache models

Usage

Add this package as a dependency in your feature package's pubspec.yaml:

dependencies:
  littlefish_feature_models:
    path: ../../models/littlefish_feature_models

Then import the models you need:

import 'package:littlefish_feature_models/littlefish_feature_models.dart';

// Or import specific domains
import 'package:littlefish_feature_models/models/customers/customers.dart';
import 'package:littlefish_feature_models/models/stock/stock.dart';

Dependencies

  • littlefish_core: ^4.2.0
  • littlefish_core_utils
  • json_annotation: ^4.9.0

Development

To generate JSON serialization code:

dart run build_runner build --delete-conflicting-outputs

Libraries

littlefish_feature_models
Shared domain models package for littlefish merchant app.
models/accounts/linked_accounts
models/checkout/checkout_cart_item
models/customers/customer
models/customers/customers
Customer models exports
models/products/product_combo
models/products/product_discount
models/products/product_modifier
models/products/products
Products models exports
models/shared/country_list
models/shared/country_stub
models/shared/data/address
models/shared/data/contact
models/shared/data_item
models/shared/enums
models/shared/image_representable
models/shared/shared
Shared models exports
models/shared/simple_data_item
models/stock/external_product_values
models/stock/full_product
models/stock/online_product_update
models/stock/product_option
models/stock/promotion
models/stock/promotion_item
models/stock/single_option_attribute
models/stock/stock
Stock models exports
models/stock/stock_category
models/stock/stock_product
models/stock/stock_run
models/stock/stock_run_helper
models/stock/stock_take_item
models/stock/stock_variance
models/stock/store_product
models/store/business_profile
models/store/business_system_value
models/store/business_type
models/store/geo_flutter_fire/geo_flutter_fire_export
models/store/geo_flutter_fire/src/collection
models/store/geo_flutter_fire/src/geoflutterfire
models/store/geo_flutter_fire/src/models/distance_doc_snapshot
models/store/geo_flutter_fire/src/point
models/store/geo_flutter_fire/src/util
models/store/receipt_data
models/store/store
Store models exports
models/store/store_address
models/tax/sales_tax
models/tax/tax
Tax models exports
models/tax/vat_level
utils/date_extensions
utils/enums
utils/model_utils
utils/string_extensions