{
  "version": "5",
  "dialect": "mysql",
  "id": "f62ddf84-b5a1-49fb-b272-5a5d96acf838",
  "prevId": "61c2e7be-1b66-4e0f-918a-44917f92c891",
  "tables": {
    "associations": {
      "name": "associations",
      "columns": {
        "id": {
          "name": "id",
          "type": "int",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": true
        },
        "userId": {
          "name": "userId",
          "type": "int",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "nomAssociation": {
          "name": "nomAssociation",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "siret": {
          "name": "siret",
          "type": "varchar(14)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "rna": {
          "name": "rna",
          "type": "varchar(10)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "adresse": {
          "name": "adresse",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "codePostal": {
          "name": "codePostal",
          "type": "varchar(10)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "ville": {
          "name": "ville",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "telephone": {
          "name": "telephone",
          "type": "varchar(20)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "emailContact": {
          "name": "emailContact",
          "type": "varchar(320)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "siteWeb": {
          "name": "siteWeb",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "dateCreation": {
          "name": "dateCreation",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "objetAssociation": {
          "name": "objetAssociation",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "statutJuridique": {
          "name": "statutJuridique",
          "type": "enum('association_loi_1901','association_reconnue_utilite_publique','fondation','autre')",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": "'association_loi_1901'"
        },
        "nomRepresentant": {
          "name": "nomRepresentant",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "fonctionRepresentant": {
          "name": "fonctionRepresentant",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "profileComplete": {
          "name": "profileComplete",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": false
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(now())"
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "onUpdate": true,
          "default": "(now())"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {
        "associations_id": {
          "name": "associations_id",
          "columns": [
            "id"
          ]
        }
      },
      "uniqueConstraints": {
        "associations_userId_unique": {
          "name": "associations_userId_unique",
          "columns": [
            "userId"
          ]
        }
      },
      "checkConstraint": {}
    },
    "documents": {
      "name": "documents",
      "columns": {
        "id": {
          "name": "id",
          "type": "int",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": true
        },
        "associationId": {
          "name": "associationId",
          "type": "int",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "nom": {
          "name": "nom",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "type": {
          "name": "type",
          "type": "enum('statuts','recepisse_declaration','rib','rapport_activite','rapport_financier','pv_assemblee','liste_dirigeants','attestation_assurance','autre')",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "fileKey": {
          "name": "fileKey",
          "type": "varchar(512)",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "fileUrl": {
          "name": "fileUrl",
          "type": "varchar(1024)",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "mimeType": {
          "name": "mimeType",
          "type": "varchar(100)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "fileSize": {
          "name": "fileSize",
          "type": "int",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "uploadedAt": {
          "name": "uploadedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(now())"
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "onUpdate": true,
          "default": "(now())"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {
        "documents_id": {
          "name": "documents_id",
          "columns": [
            "id"
          ]
        }
      },
      "uniqueConstraints": {},
      "checkConstraint": {}
    },
    "requestTemplates": {
      "name": "requestTemplates",
      "columns": {
        "id": {
          "name": "id",
          "type": "int",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": true
        },
        "type": {
          "name": "type",
          "type": "enum('subvention_fonctionnement','subvention_projet','agrement_jeunesse_education','agrement_sport','autorisation_occupation','demande_salle','autre')",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "nom": {
          "name": "nom",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "formSchema": {
          "name": "formSchema",
          "type": "text",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "documentsRequis": {
          "name": "documentsRequis",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "serviceDestinataire": {
          "name": "serviceDestinataire",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "emailDestinataire": {
          "name": "emailDestinataire",
          "type": "varchar(320)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "actif": {
          "name": "actif",
          "type": "boolean",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false,
          "default": true
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(now())"
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "onUpdate": true,
          "default": "(now())"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {
        "requestTemplates_id": {
          "name": "requestTemplates_id",
          "columns": [
            "id"
          ]
        }
      },
      "uniqueConstraints": {},
      "checkConstraint": {}
    },
    "requests": {
      "name": "requests",
      "columns": {
        "id": {
          "name": "id",
          "type": "int",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": true
        },
        "associationId": {
          "name": "associationId",
          "type": "int",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "type": {
          "name": "type",
          "type": "enum('subvention_fonctionnement','subvention_projet','agrement_jeunesse_education','agrement_sport','autorisation_occupation','demande_salle','autre')",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "titre": {
          "name": "titre",
          "type": "varchar(255)",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "description": {
          "name": "description",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "formData": {
          "name": "formData",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "status": {
          "name": "status",
          "type": "enum('brouillon','soumise','en_cours_traitement','information_complementaire','validee','refusee')",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'brouillon'"
        },
        "montantDemande": {
          "name": "montantDemande",
          "type": "int",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "montantAccorde": {
          "name": "montantAccorde",
          "type": "int",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "dateSubmission": {
          "name": "dateSubmission",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "dateTraitement": {
          "name": "dateTraitement",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "traitePar": {
          "name": "traitePar",
          "type": "int",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "commentaireAdmin": {
          "name": "commentaireAdmin",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "documentsJoints": {
          "name": "documentsJoints",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(now())"
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "onUpdate": true,
          "default": "(now())"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {
        "requests_id": {
          "name": "requests_id",
          "columns": [
            "id"
          ]
        }
      },
      "uniqueConstraints": {},
      "checkConstraint": {}
    },
    "users": {
      "name": "users",
      "columns": {
        "id": {
          "name": "id",
          "type": "int",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": true
        },
        "openId": {
          "name": "openId",
          "type": "varchar(64)",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false
        },
        "name": {
          "name": "name",
          "type": "text",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "email": {
          "name": "email",
          "type": "varchar(320)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "loginMethod": {
          "name": "loginMethod",
          "type": "varchar(64)",
          "primaryKey": false,
          "notNull": false,
          "autoincrement": false
        },
        "role": {
          "name": "role",
          "type": "enum('user','admin')",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "'user'"
        },
        "createdAt": {
          "name": "createdAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(now())"
        },
        "updatedAt": {
          "name": "updatedAt",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "onUpdate": true,
          "default": "(now())"
        },
        "lastSignedIn": {
          "name": "lastSignedIn",
          "type": "timestamp",
          "primaryKey": false,
          "notNull": true,
          "autoincrement": false,
          "default": "(now())"
        }
      },
      "indexes": {},
      "foreignKeys": {},
      "compositePrimaryKeys": {
        "users_id": {
          "name": "users_id",
          "columns": [
            "id"
          ]
        }
      },
      "uniqueConstraints": {
        "users_openId_unique": {
          "name": "users_openId_unique",
          "columns": [
            "openId"
          ]
        }
      },
      "checkConstraint": {}
    }
  },
  "views": {},
  "_meta": {
    "schemas": {},
    "tables": {},
    "columns": {}
  },
  "internal": {
    "tables": {},
    "indexes": {}
  }
}