import { getMetadataStorage } from "../utils/metadata-storage";
import { OdooModelMetadata } from "../metadata/model-metadata";

/**
 *
 */
export function OdooModel(name: string) {
    return function (target: Function) {
        const args: OdooModelMetadata = {
            target: target,
            name: name,
            document: name.replace(/\./g, "_")
        }

        getMetadataStorage().models.add(args);
    }
};