Advertisement
Guest User

Untitled

a guest
Dec 18th, 2020
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This model was generated by Lumber. However, you remain in control of your models.
  2. // Learn how here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/models/enrich-your-models
  3. module.exports = (sequelize, DataTypes) => {
  4.   const { Sequelize } = sequelize;
  5.   // This section contains the fields of your model, mapped to your table's columns.
  6.   // Learn more here: https://docs.forestadmin.com/documentation/v/v6/reference-guide/models/enrich-your-models#declaring-a-new-field-in-a-model
  7.   const Plants = sequelize.define('plants', {
  8.     internalIngredientId: {
  9.       type: DataTypes.INTEGER,
  10.       field: 'internal_ingredient_ID',
  11.     },
  12.     ingredientName: {
  13.       type: DataTypes.STRING,
  14.       field: 'Ingredient name',
  15.     },
  16.     scientificName: {
  17.       type: DataTypes.STRING,
  18.       field: 'Scientific Name',
  19.     },
  20.     foodbIngredientName: {
  21.       type: DataTypes.STRING,
  22.       field: 'foodb_ingredient_name',
  23.     },
  24.     hasENumber: {
  25.       type: DataTypes.STRING,
  26.       field: 'has E number?',
  27.     },
  28.     foodGroup: {
  29.       type: DataTypes.STRING,
  30.       field: 'food_group',
  31.     },
  32.     foodSubgroup: {
  33.       type: DataTypes.STRING,
  34.       field: 'food_subgroup',
  35.     },
  36.     partOfThePlant: {
  37.       type: DataTypes.STRING,
  38.       field: 'Part of the plant',
  39.     },
  40.     species: {
  41.       type: DataTypes.DOUBLE,
  42.       field: 'Species',
  43.     },
  44.     genus: {
  45.       type: DataTypes.DOUBLE,
  46.       field: 'Genus',
  47.     },
  48.     family: {
  49.       type: DataTypes.STRING,
  50.       field: 'Family',
  51.     },
  52.     functionalities: {
  53.       type: DataTypes.STRING,
  54.       field: 'Functionalities',
  55.     },
  56.     subFunctionalities: {
  57.       type: DataTypes.STRING,
  58.       field: 'Sub-functionalities',
  59.     },
  60.     nutritionalHealthBenefit: {
  61.       type: DataTypes.STRING,
  62.       field: 'Nutritional / health benefit',
  63.     },
  64.     additionalInfo: {
  65.       type: DataTypes.STRING,
  66.       field: 'Additional info',
  67.     },
  68.     sourceReference: {
  69.       type: DataTypes.STRING,
  70.       field: 'Source / Reference',
  71.     },
  72.     scientificValidation: {
  73.       type: DataTypes.STRING,
  74.       field: 'Scientific Validation',
  75.     },
  76.     imageLink: {
  77.       type: DataTypes.DOUBLE,
  78.       field: 'Image - link',
  79.     },
  80.     foodbFoodPublicId: {
  81.       type: DataTypes.STRING,
  82.       field: 'foodb_food_public_id',
  83.     },
  84.     foodbPublicId: {
  85.       type: DataTypes.STRING,
  86.       field: 'foodb_public_id',
  87.     },
  88.     'Calories (Kcal/100g)': {
  89.       type: DataTypes.DOUBLE,
  90.     },
  91.     'Proteins (%)': {
  92.       type: DataTypes.DOUBLE,
  93.     },
  94.     'Net / Total Available Carbohydrates (%)': {
  95.       type: DataTypes.DOUBLE,
  96.     },
  97.     'Free Sugars (%)': {
  98.       type: DataTypes.DOUBLE,
  99.     },
  100.     'Sodium (%)': {
  101.       type: DataTypes.DOUBLE,
  102.     },
  103.     'Total Fats (%)': {
  104.       type: DataTypes.DOUBLE,
  105.     },
  106.     'Saturated Fats (%)': {
  107.       type: DataTypes.DOUBLE,
  108.     },
  109.     'Mono-insaturated Fats (%)': {
  110.       type: DataTypes.DOUBLE,
  111.     },
  112.     'Poly-insaturated Fats (%)': {
  113.       type: DataTypes.DOUBLE,
  114.     },
  115.     'Trans Fats (%)': {
  116.       type: DataTypes.DOUBLE,
  117.     },
  118.     'Cholesterol (%)': {
  119.       type: DataTypes.DOUBLE,
  120.     },
  121.     totalFiber: {
  122.       type: DataTypes.DOUBLE,
  123.       field: 'Total Fiber (%)',
  124.     },
  125.     'Soluble Fiber (%)': {
  126.       type: DataTypes.DOUBLE,
  127.     },
  128.     'Insoluble Fiber (%)': {
  129.       type: DataTypes.DOUBLE,
  130.     },
  131.     vitamins: {
  132.       type: DataTypes.DOUBLE,
  133.       field: 'Vitamins',
  134.     },
  135.     minerals: {
  136.       type: DataTypes.DOUBLE,
  137.       field: 'Minerals',
  138.     },
  139.     'Toxicity (Y/N, based on NOEL Value)': {
  140.       type: DataTypes.DOUBLE,
  141.     },
  142.     healthRelatedConcern: {
  143.       type: DataTypes.DOUBLE,
  144.       field: 'Health Related Concern',
  145.     },
  146.     explanationOfWhyItHasThatEffect: {
  147.       type: DataTypes.DOUBLE,
  148.       field: 'Explanation of why it has that effect',
  149.     },
  150.     rasa: {
  151.       type: DataTypes.DOUBLE,
  152.       field: 'Rasa',
  153.     },
  154.     guna: {
  155.       type: DataTypes.DOUBLE,
  156.       field: 'Guna',
  157.     },
  158.     dosha: {
  159.       type: DataTypes.DOUBLE,
  160.       field: 'Dosha',
  161.     },
  162.     panchabuta: {
  163.       type: DataTypes.DOUBLE,
  164.       field: 'Panchabuta',
  165.     },
  166.     temperature: {
  167.       type: DataTypes.DOUBLE,
  168.       field: 'Temperature',
  169.     },
  170.     'Melting/Freezing Point (°C)': {
  171.       type: DataTypes.DOUBLE,
  172.     },
  173.     'Boiling Point (°C)': {
  174.       type: DataTypes.DOUBLE,
  175.     },
  176.     pKa: {
  177.       type: DataTypes.DOUBLE,
  178.     },
  179.     pHMaximumAvailableConcentrationRt: {
  180.       type: DataTypes.DOUBLE,
  181.       field: 'pH @ maximum available concentration, RT',
  182.     },
  183.     ec: {
  184.       type: DataTypes.DOUBLE,
  185.       field: 'EC',
  186.     },
  187.     'Moisture (%)': {
  188.       type: DataTypes.DOUBLE,
  189.     },
  190.     coefficentOfExpansionMoisture: {
  191.       type: DataTypes.DOUBLE,
  192.       field: 'Coefficent of expansion - Moisture',
  193.     },
  194.     'Porosity (%)': {
  195.       type: DataTypes.DOUBLE,
  196.     },
  197.     'Density (g/L)': {
  198.       type: DataTypes.DOUBLE,
  199.     },
  200.     flammability: {
  201.       type: DataTypes.DOUBLE,
  202.       field: 'Flammability',
  203.     },
  204.     thermalStability: {
  205.       type: DataTypes.DOUBLE,
  206.       field: 'Thermal Stability',
  207.     },
  208.     'Viscosity (cP)': {
  209.       type: DataTypes.DOUBLE,
  210.     },
  211.     gelificationEmulsification: {
  212.       type: DataTypes.DOUBLE,
  213.       field: 'Gelification / Emulsification',
  214.     },
  215.     crystallization: {
  216.       type: DataTypes.DOUBLE,
  217.       field: 'Crystallization',
  218.     },
  219.     adhesiveStrength: {
  220.       type: DataTypes.DOUBLE,
  221.       field: 'Adhesive Strength',
  222.     },
  223.     cohesiveStrength: {
  224.       type: DataTypes.DOUBLE,
  225.       field: 'Cohesive Strength',
  226.     },
  227.     leaveningPower: {
  228.       type: DataTypes.DOUBLE,
  229.       field: 'Leavening Power',
  230.     },
  231.     micMlcMicrobial: {
  232.       type: DataTypes.DOUBLE,
  233.       field: 'MIC/MLC, Microbial',
  234.     },
  235.     oxidationOxygenDamage: {
  236.       type: DataTypes.DOUBLE,
  237.       field: 'Oxidation / Oxygen Damage',
  238.     },
  239.     compressiveStrength: {
  240.       type: DataTypes.DOUBLE,
  241.       field: 'Compressive Strength',
  242.     },
  243.     tensileStrength: {
  244.       type: DataTypes.DOUBLE,
  245.       field: 'Tensile Strength',
  246.     },
  247.     shearResistance: {
  248.       type: DataTypes.DOUBLE,
  249.       field: 'Shear Resistance',
  250.     },
  251.     impact: {
  252.       type: DataTypes.DOUBLE,
  253.       field: 'Impact',
  254.     },
  255.     others: {
  256.       type: DataTypes.DOUBLE,
  257.       field: 'Others',
  258.     },
  259.     formShapeSize: {
  260.       type: DataTypes.DOUBLE,
  261.       field: 'Form / Shape & Size',
  262.     },
  263.     tasteIncludingPurgeTrap: {
  264.       type: DataTypes.DOUBLE,
  265.       field: 'Taste, including Purge & Trap',
  266.     },
  267.     'Juiciness (1-5)': {
  268.       type: DataTypes.DOUBLE,
  269.     },
  270.     'Greasy-ness (Scale 1-5)': {
  271.       type: DataTypes.DOUBLE,
  272.     },
  273.     texture: {
  274.       type: DataTypes.DOUBLE,
  275.       field: 'Texture',
  276.     },
  277.     'Hardness (Scale 1-5)': {
  278.       type: DataTypes.DOUBLE,
  279.     },
  280.     plasticity: {
  281.       type: DataTypes.DOUBLE,
  282.       field: 'Plasticity',
  283.     },
  284.     elasticity: {
  285.       type: DataTypes.DOUBLE,
  286.       field: 'Elasticity',
  287.     },
  288.     smell: {
  289.       type: DataTypes.DOUBLE,
  290.       field: 'Smell',
  291.     },
  292.     sound: {
  293.       type: DataTypes.DOUBLE,
  294.       field: 'Sound',
  295.     },
  296.     colorAndAppearance: {
  297.       type: DataTypes.DOUBLE,
  298.       field: 'Color and Appearance',
  299.     },
  300.     zoneAvailability: {
  301.       type: DataTypes.DOUBLE,
  302.       field: 'Zone Availability',
  303.     },
  304.     landConsumptionTonAcre: {
  305.       type: DataTypes.DOUBLE,
  306.       field: 'Land Consumption (ton/acre)',
  307.     },
  308.     'Water Consumption (L/kg)': {
  309.       type: DataTypes.DOUBLE,
  310.     },
  311.     'Energy Consuption (kg/MJ)': {
  312.       type: DataTypes.DOUBLE,
  313.     },
  314.     'Time Consumption (crops/year)': {
  315.       type: DataTypes.DOUBLE,
  316.     },
  317.     carbonFootprint: {
  318.       type: DataTypes.DOUBLE,
  319.       field: 'Carbon Footprint',
  320.     },
  321.     'Any Social Concerns (Y/N). If Y, explain.': {
  322.       type: DataTypes.DOUBLE,
  323.     },
  324.     sourcesOfInfo: {
  325.       type: DataTypes.DOUBLE,
  326.       field: 'Sources of Info',
  327.     },
  328.     'Estimated price (USD/kg)': {
  329.       type: DataTypes.DOUBLE,
  330.     },
  331.     deprecatedInternalIDs: {
  332.       type: DataTypes.STRING,
  333.       field: 'deprecated_internal_IDs',
  334.     },
  335.   }, {
  336.     tableName: 'plants',
  337.     timestamps: false,
  338.     schema: process.env.DATABASE_SCHEMA,
  339.   });
  340.   Plants.removeAttribute('id');
  341.   // This section contains the relationships for this model. See: https://docs.forestadmin.com/documentation/v/v6/reference-guide/relationships#adding-relationships.
  342.   Plants.associate = (models) => {
  343.   };
  344.  
  345.   return Plants;
  346. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement