Seeder v2 update

This commit is contained in:
Vincent Alamelle 2023-05-11 14:16:16 +02:00
parent fea4471923
commit 23eb8aecc4
2 changed files with 134 additions and 134 deletions

View File

@ -17,7 +17,7 @@
"@Test": "./dist/test"
},
"scripts": {
"build-db": "npx prisma migrate dev && node ./dist/common/databases/seeders/seeder.js",
"build-db": "npx prisma migrate dev",
"build": "tsc",
"start": "node ./dist/entries/App.js",
"api:start": "npm run migrate && npm run start",

View File

@ -284,8 +284,8 @@ import {
const addresses: Addresses[] = [
{
uid: uidAddress1,
address: "123 Main St",
city: "Los Angeles",
address: "148 Avenue du bac",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
updated_at: new Date(),
@ -340,7 +340,7 @@ import {
},
{
uid: uidAddress8,
address: "Rue Pierre Pologne",
address: "Rue Maxime Henry",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -348,7 +348,7 @@ import {
},
{
uid: uidAddress9,
address: "Rue Pierre Pologne",
address: "Rue Maxime Francis",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -356,7 +356,7 @@ import {
},
{
uid: uidAddress10,
address: "Rue Pierre Pologne",
address: "Avenue Paul Roger",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -364,7 +364,7 @@ import {
},
{
uid: uidAddress11,
address: "Rue Pierre Pologne",
address: "Avenue Paul Franck",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -372,7 +372,7 @@ import {
},
{
uid: uidAddress12,
address: "Rue Pierre Pologne",
address: "Avenue Paul Maréchal",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -380,7 +380,7 @@ import {
},
{
uid: uidAddress13,
address: "Rue Pierre Pologne",
address: "Avenue Marcel Denis",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -388,7 +388,7 @@ import {
},
{
uid: uidAddress14,
address: "Rue Pierre Pologne",
address: "Place Alexandre",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -396,7 +396,7 @@ import {
},
{
uid: uidAddress15,
address: "Rue Pierre Pologne",
address: "Place Alexandre Jacques",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -404,7 +404,7 @@ import {
},
{
uid: uidAddress16,
address: "Rue Pierre Pologne",
address: "Place Alexandre 2",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -412,7 +412,7 @@ import {
},
{
uid: uidAddress17,
address: "Rue Pierre Pologne",
address: "Rue du livre",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -420,7 +420,7 @@ import {
},
{
uid: uidAddress18,
address: "Rue Pierre Pologne",
address: "Place de la joie",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -428,7 +428,7 @@ import {
},
{
uid: uidAddress19,
address: "Rue Pierre Pologne",
address: "Rue Paul Henry",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -436,7 +436,7 @@ import {
},
{
uid: uidAddress20,
address: "Rue Pierre Pologne",
address: "Rue Marcelin",
city: "Rennes",
zip_code: 35000,
created_at: new Date(),
@ -449,37 +449,37 @@ import {
{
uid: uidContact1,
address_uid: uidAddress1,
first_name: "John",
last_name: "Doe",
email: "john.doe@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.MALE,
},
{
uid: uidContact2,
address_uid: uidAddress2,
first_name: "Jane",
last_name: "Doe",
email: "jane.doe@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Manon",
last_name: "Simon",
email: "manon.simon@gmail.com",
phone_number: "06 12 34 56 78",
cell_phone_number: "06 12 34 56 78",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
},
{
uid: uidContact2,
address_uid: uidAddress2,
first_name: "Kevin",
last_name: "Hautefaye",
email: "kevin.hautefaye@gmail.com",
phone_number: "06 23 45 67 89",
cell_phone_number: "06 23 45 67 89",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.MALE,
},
{
uid: uidContact3,
address_uid: uidAddress3,
first_name: "Maitre Marcelino",
last_name: "Jack",
email: "Marcelino.Jack@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Maxime",
last_name: "Lalo",
email: "maxime.lalo@gmail.com",
phone_number: "06 34 56 78 90",
cell_phone_number: "06 34 56 78 90",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -488,50 +488,50 @@ import {
{
uid: uidContact4,
address_uid: uidAddress4,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack19@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Vincent",
last_name: "Brognard",
email: "vincent.brognard@gmail.com",
phone_number: "06 45 67 89 01",
cell_phone_number: "06 45 67 89 01",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
{
uid: uidContact5,
address_uid: uidAddress5,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack18@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Maxime",
last_name: "Leroy",
email: "maxime.leroy@hotmail.fr",
phone_number: "06 56 78 90 12",
cell_phone_number: "06 56 78 90 12",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
{
uid: uidContact6,
address_uid: uidAddress6,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack2@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Thibault",
last_name: "Dubois",
email: "thibault.dubois@outlook.com",
phone_number: "06 67 89 01 23",
cell_phone_number: "06 67 89 01 23",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
{
uid: uidContact7,
address_uid: uidAddress7,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack3@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Léa",
last_name: "Fontaine",
email: "lea.fontaine@gmail.com",
phone_number: "06 78 90 12 34",
cell_phone_number: "06 78 90 12 34",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -540,24 +540,24 @@ import {
{
uid: uidContact8,
address_uid: uidAddress8,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack4@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Guillaume",
last_name: "Renaud",
email: "guillaume.renaud@gmail.com",
phone_number: "06 89 01 23 45",
cell_phone_number: "06 89 01 23 45",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
{
uid: uidContact9,
address_uid: uidAddress9,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack5@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Lucie",
last_name: "Chevalier",
email: "lucie.chevalier@outlook.com",
phone_number: "07 12 34 56 78",
cell_phone_number: "07 12 34 56 78",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -566,24 +566,24 @@ import {
{
uid: uidContact10,
address_uid: uidAddress10,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack6@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Sébastien",
last_name: "Dubois",
email: "sebastien.dubois@gmail.com",
phone_number: "07 23 45 67 89",
cell_phone_number: "07 23 45 67 89",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
{
uid: uidContact11,
address_uid: uidAddress11,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack7@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Mathilde",
last_name: "Durand",
email: "mathilde.durand@gmail.com",
phone_number: "07 34 56 78 90",
cell_phone_number: "07 34 56 78 90",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -592,24 +592,24 @@ import {
{
uid: uidContact12,
address_uid: uidAddress12,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack8@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Antoine",
last_name: "Bernard",
email: "antoine.bernard@outlook.com",
phone_number: "07 45 67 89 01",
cell_phone_number: "07 45 67 89 01",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
{
uid: uidContact13,
address_uid: uidAddress13,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack9@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Camille",
last_name: "Laurent",
email: "camille.laurent@gmail.com",
phone_number: "07 56 78 90 12",
cell_phone_number: "07 56 78 90 12",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -618,24 +618,24 @@ import {
{
uid: uidContact14,
address_uid: uidAddress14,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack10@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Julien",
last_name: "Mercier",
email: "julien.mercier@hotmail.fr",
phone_number: "07 67 89 01 23",
cell_phone_number: "07 67 89 01 23",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
{
uid: uidContact15,
address_uid: uidAddress15,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack11@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Charlotte",
last_name: "Lefebvre",
email: "charlotte.lefebvre@gmail.com",
phone_number: "07 78 90 12 34",
cell_phone_number: "07 78 90 12 34",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -644,11 +644,11 @@ import {
{
uid: uidContact16,
address_uid: uidAddress16,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack12@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Caroline",
last_name: "Pallut",
email: "caroline.pallut@gmail.com",
phone_number: "07 89 01 23 45",
cell_phone_number: "07 89 01 23 45",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -657,11 +657,11 @@ import {
{
uid: uidContact17,
address_uid: uidAddress17,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack13@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Nadège",
last_name: "Gauchet",
email: "nedege.gauchet@outlook.com",
phone_number: "06 11 22 33 44",
cell_phone_number: "06 11 22 33 44",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -670,24 +670,24 @@ import {
{
uid: uidContact18,
address_uid: uidAddress18,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack14@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Matthieu",
last_name: "Bougeard",
email: "matthieu.bougeard@gmail.com",
phone_number: "07 22 33 44 55",
cell_phone_number: "07 22 33 44 55",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
{
uid: uidContact19,
address_uid: uidAddress19,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack15@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Cécile",
last_name: "Celton",
email: "cecile.celton@outlook.com",
phone_number: "06 55 66 77 88",
cell_phone_number: "06 55 66 77 88",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
@ -696,15 +696,15 @@ import {
{
uid: uidContact20,
address_uid: uidAddress20,
first_name: "Maitre Massi",
last_name: "Jack",
email: "Massi.Jack16@example.com",
phone_number: randomString(),
cell_phone_number: randomString(),
first_name: "Gwendal",
last_name: "Texier",
email: "gwendal.texier@gmail.com",
phone_number: "07 88 99 00 11",
cell_phone_number: "07 88 99 00 11",
birthdate: null,
created_at: new Date(),
updated_at: new Date(),
civility: ECivility.FEMALE,
civility: ECivility.MALE,
},
];
@ -712,7 +712,7 @@ import {
{
uid: uidOffice1,
idNot: randomString(),
name: "LA Office",
name: "Office Rennes",
crpcen: randomString(),
address_uid: uidAddress1,
created_at: new Date(),