Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This model was generated by Lumber. However, you remain in control of your models.
- // Learn how here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/models/enrich-your-models
- module.exports = (sequelize, DataTypes) => {
- const { Sequelize } = sequelize;
- // This section contains the fields of your model, mapped to your table's columns.
- // Learn more here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model
- const Plants = sequelize.define('plants', {
- internalIngredientId: {
- type: DataTypes.INTEGER,
- field: 'internal_ingredient_ID',
- },
- ingredientName: {
- type: DataTypes.STRING,
- field: 'Ingredient name',
- },
- scientificName: {
- type: DataTypes.STRING,
- field: 'Scientific Name',
- },
- foodbIngredientName: {
- type: DataTypes.STRING,
- field: 'foodb_ingredient_name',
- },
- hasENumber: {
- type: DataTypes.STRING,
- field: 'has E number?',
- },
- foodGroup: {
- type: DataTypes.STRING,
- field: 'food_group',
- },
- foodSubgroup: {
- type: DataTypes.STRING,
- field: 'food_subgroup',
- },
- partOfThePlant: {
- type: DataTypes.STRING,
- field: 'Part of the plant',
- },
- species: {
- type: DataTypes.DOUBLE,
- field: 'Species',
- },
- genus: {
- type: DataTypes.DOUBLE,
- field: 'Genus',
- },
- family: {
- type: DataTypes.STRING,
- field: 'Family',
- },
- functionalities: {
- type: DataTypes.STRING,
- field: 'Functionalities',
- },
- subFunctionalities: {
- type: DataTypes.STRING,
- field: 'Sub-functionalities',
- },
- nutritionalHealthBenefit: {
- type: DataTypes.STRING,
- field: 'Nutritional / health benefit',
- },
- additionalInfo: {
- type: DataTypes.STRING,
- field: 'Additional info',
- },
- sourceReference: {
- type: DataTypes.STRING,
- field: 'Source / Reference',
- },
- scientificValidation: {
- type: DataTypes.STRING,
- field: 'Scientific Validation',
- },
- imageLink: {
- type: DataTypes.DOUBLE,
- field: 'Image - link',
- },
- foodbFoodPublicId: {
- type: DataTypes.STRING,
- field: 'foodb_food_public_id',
- },
- foodbPublicId: {
- type: DataTypes.STRING,
- field: 'foodb_public_id',
- },
- 'Calories (Kcal/100g)': {
- type: DataTypes.DOUBLE,
- },
- 'Proteins (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Net / Total Available Carbohydrates (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Free Sugars (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Sodium (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Total Fats (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Saturated Fats (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Mono-insaturated Fats (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Poly-insaturated Fats (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Trans Fats (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Cholesterol (%)': {
- type: DataTypes.DOUBLE,
- },
- totalFiber: {
- type: DataTypes.DOUBLE,
- field: 'Total Fiber (%)',
- },
- 'Soluble Fiber (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Insoluble Fiber (%)': {
- type: DataTypes.DOUBLE,
- },
- vitamins: {
- type: DataTypes.DOUBLE,
- field: 'Vitamins',
- },
- minerals: {
- type: DataTypes.DOUBLE,
- field: 'Minerals',
- },
- 'Toxicity (Y/N, based on NOEL Value)': {
- type: DataTypes.DOUBLE,
- },
- healthRelatedConcern: {
- type: DataTypes.DOUBLE,
- field: 'Health Related Concern',
- },
- explanationOfWhyItHasThatEffect: {
- type: DataTypes.DOUBLE,
- field: 'Explanation of why it has that effect',
- },
- rasa: {
- type: DataTypes.DOUBLE,
- field: 'Rasa',
- },
- guna: {
- type: DataTypes.DOUBLE,
- field: 'Guna',
- },
- dosha: {
- type: DataTypes.DOUBLE,
- field: 'Dosha',
- },
- panchabuta: {
- type: DataTypes.DOUBLE,
- field: 'Panchabuta',
- },
- temperature: {
- type: DataTypes.DOUBLE,
- field: 'Temperature',
- },
- 'Melting/Freezing Point (°C)': {
- type: DataTypes.DOUBLE,
- },
- 'Boiling Point (°C)': {
- type: DataTypes.DOUBLE,
- },
- pKa: {
- type: DataTypes.DOUBLE,
- },
- pHMaximumAvailableConcentrationRt: {
- type: DataTypes.DOUBLE,
- field: 'pH @ maximum available concentration, RT',
- },
- ec: {
- type: DataTypes.DOUBLE,
- field: 'EC',
- },
- 'Moisture (%)': {
- type: DataTypes.DOUBLE,
- },
- coefficentOfExpansionMoisture: {
- type: DataTypes.DOUBLE,
- field: 'Coefficent of expansion - Moisture',
- },
- 'Porosity (%)': {
- type: DataTypes.DOUBLE,
- },
- 'Density (g/L)': {
- type: DataTypes.DOUBLE,
- },
- flammability: {
- type: DataTypes.DOUBLE,
- field: 'Flammability',
- },
- thermalStability: {
- type: DataTypes.DOUBLE,
- field: 'Thermal Stability',
- },
- 'Viscosity (cP)': {
- type: DataTypes.DOUBLE,
- },
- gelificationEmulsification: {
- type: DataTypes.DOUBLE,
- field: 'Gelification / Emulsification',
- },
- crystallization: {
- type: DataTypes.DOUBLE,
- field: 'Crystallization',
- },
- adhesiveStrength: {
- type: DataTypes.DOUBLE,
- field: 'Adhesive Strength',
- },
- cohesiveStrength: {
- type: DataTypes.DOUBLE,
- field: 'Cohesive Strength',
- },
- leaveningPower: {
- type: DataTypes.DOUBLE,
- field: 'Leavening Power',
- },
- micMlcMicrobial: {
- type: DataTypes.DOUBLE,
- field: 'MIC/MLC, Microbial',
- },
- oxidationOxygenDamage: {
- type: DataTypes.DOUBLE,
- field: 'Oxidation / Oxygen Damage',
- },
- compressiveStrength: {
- type: DataTypes.DOUBLE,
- field: 'Compressive Strength',
- },
- tensileStrength: {
- type: DataTypes.DOUBLE,
- field: 'Tensile Strength',
- },
- shearResistance: {
- type: DataTypes.DOUBLE,
- field: 'Shear Resistance',
- },
- impact: {
- type: DataTypes.DOUBLE,
- field: 'Impact',
- },
- others: {
- type: DataTypes.DOUBLE,
- field: 'Others',
- },
- formShapeSize: {
- type: DataTypes.DOUBLE,
- field: 'Form / Shape & Size',
- },
- tasteIncludingPurgeTrap: {
- type: DataTypes.DOUBLE,
- field: 'Taste, including Purge & Trap',
- },
- 'Juiciness (1-5)': {
- type: DataTypes.DOUBLE,
- },
- 'Greasy-ness (Scale 1-5)': {
- type: DataTypes.DOUBLE,
- },
- texture: {
- type: DataTypes.DOUBLE,
- field: 'Texture',
- },
- 'Hardness (Scale 1-5)': {
- type: DataTypes.DOUBLE,
- },
- plasticity: {
- type: DataTypes.DOUBLE,
- field: 'Plasticity',
- },
- elasticity: {
- type: DataTypes.DOUBLE,
- field: 'Elasticity',
- },
- smell: {
- type: DataTypes.DOUBLE,
- field: 'Smell',
- },
- sound: {
- type: DataTypes.DOUBLE,
- field: 'Sound',
- },
- colorAndAppearance: {
- type: DataTypes.DOUBLE,
- field: 'Color and Appearance',
- },
- zoneAvailability: {
- type: DataTypes.DOUBLE,
- field: 'Zone Availability',
- },
- landConsumptionTonAcre: {
- type: DataTypes.DOUBLE,
- field: 'Land Consumption (ton/acre)',
- },
- 'Water Consumption (L/kg)': {
- type: DataTypes.DOUBLE,
- },
- 'Energy Consuption (kg/MJ)': {
- type: DataTypes.DOUBLE,
- },
- 'Time Consumption (crops/year)': {
- type: DataTypes.DOUBLE,
- },
- carbonFootprint: {
- type: DataTypes.DOUBLE,
- field: 'Carbon Footprint',
- },
- 'Any Social Concerns (Y/N). If Y, explain.': {
- type: DataTypes.DOUBLE,
- },
- sourcesOfInfo: {
- type: DataTypes.DOUBLE,
- field: 'Sources of Info',
- },
- 'Estimated price (USD/kg)': {
- type: DataTypes.DOUBLE,
- },
- deprecatedInternalIDs: {
- type: DataTypes.STRING,
- field: 'deprecated_internal_IDs',
- },
- }, {
- tableName: 'plants',
- timestamps: false,
- schema: process.env.DATABASE_SCHEMA,
- });
- Plants.removeAttribute('id');
- // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v6/reference-guide/relationships#adding-relationships.
- Plants.associate = (models) => {
- };
- return Plants;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement