1976 lines
53 KiB
TypeScript
1976 lines
53 KiB
TypeScript
import {
|
|
Addresses,
|
|
Contacts,
|
|
Customers,
|
|
DeedHasDocumentTypes,
|
|
DeedTypeHasDocumentTypes,
|
|
DeedTypes,
|
|
Deeds,
|
|
DocumentTypes,
|
|
Documents,
|
|
EFolderStatus,
|
|
EOfficeStatus,
|
|
OfficeFolderHasCustomers,
|
|
OfficeFolders,
|
|
Offices,
|
|
Users,
|
|
ECivility,
|
|
ECustomerStatus,
|
|
PrismaClient,
|
|
} from "@prisma/client";
|
|
|
|
(async () => {
|
|
const prisma = new PrismaClient();
|
|
|
|
const existingData = await prisma.contacts.findFirst({ where: { email: "john.doe@example.com" } });
|
|
if (existingData) {
|
|
console.log("Seed data already exists. Skipping seeding process.");
|
|
return;
|
|
}
|
|
|
|
const randomString = () => {
|
|
const chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
let result = "";
|
|
for (let i = 10; i > 0; --i) result += chars[Math.floor(Math.random() * chars.length)];
|
|
return result;
|
|
};
|
|
const uidCustomer1: string = randomString();
|
|
const uidCustomer2: string = randomString();
|
|
const uidCustomer3: string = randomString();
|
|
const uidCustomer4: string = randomString();
|
|
const uidCustomer5: string = randomString();
|
|
const uidCustomer6: string = randomString();
|
|
const uidCustomer7: string = randomString();
|
|
const uidCustomer8: string = randomString();
|
|
const uidCustomer9: string = randomString();
|
|
const uidCustomer10: string = randomString();
|
|
const uidCustomer11: string = randomString();
|
|
const uidCustomer12: string = randomString();
|
|
const uidCustomer13: string = randomString();
|
|
const uidCustomer14: string = randomString();
|
|
const uidCustomer15: string = randomString();
|
|
|
|
const uidContact1: string = randomString();
|
|
const uidContact2: string = randomString();
|
|
const uidContact3: string = randomString();
|
|
const uidContact4: string = randomString();
|
|
const uidContact5: string = randomString();
|
|
const uidContact6: string = randomString();
|
|
const uidContact7: string = randomString();
|
|
const uidContact8: string = randomString();
|
|
const uidContact9: string = randomString();
|
|
const uidContact10: string = randomString();
|
|
const uidContact11: string = randomString();
|
|
const uidContact12: string = randomString();
|
|
const uidContact13: string = randomString();
|
|
const uidContact14: string = randomString();
|
|
const uidContact15: string = randomString();
|
|
const uidContact16: string = randomString();
|
|
const uidContact17: string = randomString();
|
|
const uidContact18: string = randomString();
|
|
const uidContact19: string = randomString();
|
|
const uidContact20: string = randomString();
|
|
|
|
const uidAddress1: string = randomString();
|
|
const uidAddress2: string = randomString();
|
|
const uidAddress3: string = randomString();
|
|
const uidAddress4: string = randomString();
|
|
const uidAddress5: string = randomString();
|
|
const uidAddress6: string = randomString();
|
|
const uidAddress7: string = randomString();
|
|
const uidAddress8: string = randomString();
|
|
const uidAddress9: string = randomString();
|
|
const uidAddress10: string = randomString();
|
|
const uidAddress11: string = randomString();
|
|
const uidAddress12: string = randomString();
|
|
const uidAddress13: string = randomString();
|
|
const uidAddress14: string = randomString();
|
|
const uidAddress15: string = randomString();
|
|
const uidAddress16: string = randomString();
|
|
const uidAddress17: string = randomString();
|
|
const uidAddress18: string = randomString();
|
|
const uidAddress19: string = randomString();
|
|
const uidAddress20: string = randomString();
|
|
|
|
const uidOffice1: string = randomString();
|
|
|
|
const uidUser1: string = randomString();
|
|
const uidUser2: string = randomString();
|
|
const uidUser3: string = randomString();
|
|
const uidUser4: string = randomString();
|
|
const uidUser5: string = randomString();
|
|
|
|
const uidOfficeFolder1: string = randomString();
|
|
const uidOfficeFolder2: string = randomString();
|
|
const uidOfficeFolder3: string = randomString();
|
|
const uidOfficeFolder4: string = randomString();
|
|
const uidOfficeFolder5: string = randomString();
|
|
const uidOfficeFolder6: string = randomString();
|
|
const uidOfficeFolder7: string = randomString();
|
|
const uidOfficeFolder8: string = randomString();
|
|
const uidOfficeFolder9: string = randomString();
|
|
const uidOfficeFolder10: string = randomString();
|
|
const uidOfficeFolder11: string = randomString();
|
|
const uidOfficeFolder12: string = randomString();
|
|
const uidOfficeFolder13: string = randomString();
|
|
const uidOfficeFolder14: string = randomString();
|
|
const uidOfficeFolder15: string = randomString();
|
|
const uidOfficeFolder16: string = randomString();
|
|
const uidOfficeFolder17: string = randomString();
|
|
const uidOfficeFolder18: string = randomString();
|
|
const uidOfficeFolder19: string = randomString();
|
|
const uidOfficeFolder20: string = randomString();
|
|
const uidOfficeFolder21: string = randomString();
|
|
|
|
const uidDeed1: string = randomString();
|
|
const uidDeed2: string = randomString();
|
|
const uidDeed3: string = randomString();
|
|
const uidDeed4: string = randomString();
|
|
const uidDeed5: string = randomString();
|
|
const uidDeed6: string = randomString();
|
|
const uidDeed7: string = randomString();
|
|
const uidDeed8: string = randomString();
|
|
const uidDeed9: string = randomString();
|
|
const uidDeed10: string = randomString();
|
|
const uidDeed11: string = randomString();
|
|
const uidDeed12: string = randomString();
|
|
const uidDeed13: string = randomString();
|
|
const uidDeed14: string = randomString();
|
|
const uidDeed15: string = randomString();
|
|
const uidDeed16: string = randomString();
|
|
const uidDeed17: string = randomString();
|
|
const uidDeed18: string = randomString();
|
|
const uidDeed19: string = randomString();
|
|
const uidDeed20: string = randomString();
|
|
const uidDeed21: string = randomString();
|
|
|
|
|
|
const uidDeedType1: string = randomString();
|
|
const uidDeedType2: string = randomString();
|
|
const uidDeedType3: string = randomString();
|
|
const uidDeedType4: string = randomString();
|
|
|
|
const uidDocumentType1: string = randomString();
|
|
const uidDocumentType2: string = randomString();
|
|
const uidDocumentType3: string = randomString();
|
|
const uidDocumentType4: string = randomString();
|
|
const uidDocumentType5: string = randomString();
|
|
const uidDocumentType6: string = randomString();
|
|
const uidDocumentType7: string = randomString();
|
|
const uidDocumentType8: string = randomString();
|
|
const uidDocumentType9: string = randomString();
|
|
const uidDocumentType10: string = randomString();
|
|
const uidDocumentType11: string = randomString();
|
|
const uidDocumentType12: string = randomString();
|
|
const uidDocumentType13: string = randomString();
|
|
const uidDocumentType14: string = randomString();
|
|
const uidDocumentType15: string = randomString();
|
|
const uidDocumentType16: string = randomString();
|
|
const uidDocumentType17: string = randomString();
|
|
const uidDocumentType18: string = randomString();
|
|
|
|
const uidOfficeFolderHasCustomer1: string = randomString();
|
|
const uidOfficeFolderHasCustomer3: string = randomString();
|
|
const uidOfficeFolderHasCustomer4: string = randomString();
|
|
const uidOfficeFolderHasCustomer5: string = randomString();
|
|
|
|
const uidDeedHasDocumentType1: string = randomString();
|
|
const uidDeedHasDocumentType2: string = randomString();
|
|
const uidDeedHasDocumentType3: string = randomString();
|
|
const uidDeedHasDocumentType4: string = randomString();
|
|
const uidDeedHasDocumentType5: string = randomString();
|
|
const uidDeedHasDocumentType6: string = randomString();
|
|
const uidDeedHasDocumentType7: string = randomString();
|
|
const uidDeedHasDocumentType8: string = randomString();
|
|
const uidDeedHasDocumentType9: string = randomString();
|
|
const uidDeedHasDocumentType10: string = randomString();
|
|
const uidDeedHasDocumentType11: string = randomString();
|
|
const uidDeedHasDocumentType12: string = randomString();
|
|
const uidDeedHasDocumentType13: string = randomString();
|
|
const uidDeedHasDocumentType14: string = randomString();
|
|
const uidDeedHasDocumentType15: string = randomString();
|
|
const uidDeedHasDocumentType16: string = randomString();
|
|
const uidDeedHasDocumentType17: string = randomString();
|
|
const uidDeedHasDocumentType18: string = randomString();
|
|
const uidDeedHasDocumentType19: string = randomString();
|
|
const uidDeedHasDocumentType20: string = randomString();
|
|
const uidDeedHasDocumentType21: string = randomString();
|
|
const uidDeedHasDocumentType22: string = randomString();
|
|
const uidDeedHasDocumentType23: string = randomString();
|
|
const uidDeedHasDocumentType24: string = randomString();
|
|
const uidDeedHasDocumentType25: string = randomString();
|
|
const uidDeedHasDocumentType26: string = randomString();
|
|
const uidDeedHasDocumentType27: string = randomString();
|
|
const uidDeedHasDocumentType28: string = randomString();
|
|
const uidDeedHasDocumentType29: string = randomString();
|
|
const uidDeedHasDocumentType30: string = randomString();
|
|
const uidDeedHasDocumentType31: string = randomString();
|
|
const uidDeedHasDocumentType32: string = randomString();
|
|
const uidDeedHasDocumentType33: string = randomString();
|
|
const uidDeedHasDocumentType34: string = randomString();
|
|
const uidDeedHasDocumentType35: string = randomString();
|
|
const uidDeedHasDocumentType36: string = randomString();
|
|
const uidDeedHasDocumentType37: string = randomString();
|
|
const uidDeedHasDocumentType38: string = randomString();
|
|
const uidDeedHasDocumentType39: string = randomString();
|
|
const uidDeedHasDocumentType40: string = randomString();
|
|
const uidDeedHasDocumentType41: string = randomString();
|
|
const uidDeedHasDocumentType42: string = randomString();
|
|
const uidDeedHasDocumentType43: string = randomString();
|
|
const uidDeedHasDocumentType44: string = randomString();
|
|
const uidDeedHasDocumentType45: string = randomString();
|
|
const uidDeedHasDocumentType46: string = randomString();
|
|
const uidDeedHasDocumentType47: string = randomString();
|
|
const uidDeedHasDocumentType48: string = randomString();
|
|
const uidDeedHasDocumentType49: string = randomString();
|
|
const uidDeedHasDocumentType50: string = randomString();
|
|
const uidDeedHasDocumentType51: string = randomString();
|
|
const uidDeedHasDocumentType52: string = randomString();
|
|
const uidDeedHasDocumentType53: string = randomString();
|
|
|
|
|
|
|
|
const uidDeedTypeHasDocumentType1: string = randomString();
|
|
const uidDeedTypeHasDocumentType2: string = randomString();
|
|
const uidDeedTypeHasDocumentType3: string = randomString();
|
|
const uidDeedTypeHasDocumentType4: string = randomString();
|
|
const uidDeedTypeHasDocumentType5: string = randomString();
|
|
const uidDeedTypeHasDocumentType6: string = randomString();
|
|
const uidDeedTypeHasDocumentType7: string = randomString();
|
|
const uidDeedTypeHasDocumentType8: string = randomString();
|
|
|
|
|
|
|
|
const customers: Customers[] = [
|
|
{
|
|
uid: uidCustomer1,
|
|
contact_uid: uidContact1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer2,
|
|
contact_uid: uidContact2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer3,
|
|
contact_uid: uidContact3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer4,
|
|
contact_uid: uidContact4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer5,
|
|
contact_uid: uidContact5,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer6,
|
|
contact_uid: uidContact6,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer7,
|
|
contact_uid: uidContact7,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer8,
|
|
contact_uid: uidContact8,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer9,
|
|
contact_uid: uidContact9,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer10,
|
|
contact_uid: uidContact10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer11,
|
|
contact_uid: uidContact11,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer12,
|
|
contact_uid: uidContact12,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer13,
|
|
contact_uid: uidContact13,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer14,
|
|
contact_uid: uidContact14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
{
|
|
uid: uidCustomer15,
|
|
contact_uid: uidContact15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
status: ECustomerStatus.PENDING,
|
|
},
|
|
];
|
|
|
|
const addresses: Addresses[] = [
|
|
{
|
|
uid: uidAddress1,
|
|
address: "148 Avenue du bac",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress2,
|
|
address: "Rue Pierre Emillion",
|
|
city: "Pacé",
|
|
zip_code: 35740,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress3,
|
|
address: "Rue Pierre Charles",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress4,
|
|
address: "Rue Pierre Pologne",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress5,
|
|
address: "Rue Pierre Marcel",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress6,
|
|
address: "Rue Pierre Jacques",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress7,
|
|
address: "Rue Pierre Pascal",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress8,
|
|
address: "Rue Maxime Henry",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress9,
|
|
address: "Rue Maxime Francis",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress10,
|
|
address: "Avenue Paul Roger",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress11,
|
|
address: "Avenue Paul Franck",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress12,
|
|
address: "Avenue Paul Maréchal",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress13,
|
|
address: "Avenue Marcel Denis",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress14,
|
|
address: "Place Alexandre",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress15,
|
|
address: "Place Alexandre Jacques",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress16,
|
|
address: "Place Alexandre 2",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress17,
|
|
address: "Rue du livre",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress18,
|
|
address: "Place de la joie",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress19,
|
|
address: "Rue Paul Henry",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidAddress20,
|
|
address: "Rue Marcelin",
|
|
city: "Rennes",
|
|
zip_code: 35000,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
];
|
|
|
|
const contacts: Contacts[] = [
|
|
{
|
|
uid: uidContact1,
|
|
address_uid: uidAddress1,
|
|
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: "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(),
|
|
civility: ECivility.MALE,
|
|
},
|
|
{
|
|
uid: uidContact4,
|
|
address_uid: uidAddress4,
|
|
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.MALE,
|
|
},
|
|
{
|
|
uid: uidContact5,
|
|
address_uid: uidAddress5,
|
|
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.MALE,
|
|
},
|
|
{
|
|
uid: uidContact6,
|
|
address_uid: uidAddress6,
|
|
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.MALE,
|
|
},
|
|
{
|
|
uid: uidContact7,
|
|
address_uid: uidAddress7,
|
|
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(),
|
|
civility: ECivility.FEMALE,
|
|
},
|
|
{
|
|
uid: uidContact8,
|
|
address_uid: uidAddress8,
|
|
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.MALE,
|
|
},
|
|
{
|
|
uid: uidContact9,
|
|
address_uid: uidAddress9,
|
|
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(),
|
|
civility: ECivility.FEMALE,
|
|
},
|
|
{
|
|
uid: uidContact10,
|
|
address_uid: uidAddress10,
|
|
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.MALE,
|
|
},
|
|
{
|
|
uid: uidContact11,
|
|
address_uid: uidAddress11,
|
|
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(),
|
|
civility: ECivility.FEMALE,
|
|
},
|
|
{
|
|
uid: uidContact12,
|
|
address_uid: uidAddress12,
|
|
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.MALE,
|
|
},
|
|
{
|
|
uid: uidContact13,
|
|
address_uid: uidAddress13,
|
|
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(),
|
|
civility: ECivility.FEMALE,
|
|
},
|
|
{
|
|
uid: uidContact14,
|
|
address_uid: uidAddress14,
|
|
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.MALE,
|
|
},
|
|
{
|
|
uid: uidContact15,
|
|
address_uid: uidAddress15,
|
|
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(),
|
|
civility: ECivility.FEMALE,
|
|
},
|
|
{
|
|
uid: uidContact16,
|
|
address_uid: uidAddress16,
|
|
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(),
|
|
civility: ECivility.FEMALE,
|
|
},
|
|
{
|
|
uid: uidContact17,
|
|
address_uid: uidAddress17,
|
|
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(),
|
|
civility: ECivility.FEMALE,
|
|
},
|
|
{
|
|
uid: uidContact18,
|
|
address_uid: uidAddress18,
|
|
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.MALE,
|
|
},
|
|
{
|
|
uid: uidContact19,
|
|
address_uid: uidAddress19,
|
|
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(),
|
|
civility: ECivility.FEMALE,
|
|
},
|
|
{
|
|
uid: uidContact20,
|
|
address_uid: uidAddress20,
|
|
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.MALE,
|
|
},
|
|
];
|
|
|
|
const offices: Offices[] = [
|
|
{
|
|
uid: uidOffice1,
|
|
idNot: randomString(),
|
|
name: "Office Rennes",
|
|
crpcen: randomString(),
|
|
address_uid: uidAddress1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_status: EOfficeStatus.ACTIVATED,
|
|
}
|
|
];
|
|
|
|
const users: Users[] = [
|
|
{
|
|
uid: uidUser1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
idNot: randomString(),
|
|
contact_uid: uidContact16,
|
|
office_uid: uidOffice1,
|
|
},
|
|
{
|
|
uid: uidUser2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
idNot: randomString(),
|
|
contact_uid: uidContact17,
|
|
office_uid: uidOffice1,
|
|
},
|
|
{
|
|
uid: uidUser3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
idNot: randomString(),
|
|
contact_uid: uidContact18,
|
|
office_uid: uidOffice1,
|
|
},
|
|
{
|
|
uid: uidUser4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
idNot: randomString(),
|
|
contact_uid: uidContact19,
|
|
office_uid: uidOffice1,
|
|
},
|
|
{
|
|
uid: uidUser5,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
idNot: randomString(),
|
|
contact_uid: uidContact20,
|
|
office_uid: uidOffice1,
|
|
},
|
|
];
|
|
|
|
const officeFolders: OfficeFolders[] = [
|
|
{
|
|
uid: uidOfficeFolder1,
|
|
folder_number: "0001",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed1,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder2,
|
|
folder_number: "0002",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed2,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder3,
|
|
folder_number: "0003",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed3,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder4,
|
|
folder_number: "0004",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed4,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder5,
|
|
folder_number: "0005",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed5,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder6,
|
|
folder_number: "0006",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed6,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder7,
|
|
folder_number: "0007",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed7,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder8,
|
|
folder_number: "0008",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed8,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder9,
|
|
folder_number: "0009",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed9,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder10,
|
|
folder_number: "00010",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed10,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder11,
|
|
folder_number: "00011",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed11,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder12,
|
|
folder_number: "00012",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed12,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder13,
|
|
folder_number: "00013",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed13,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder14,
|
|
folder_number: "00014",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed14,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder15,
|
|
folder_number: "00015",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed15,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder16,
|
|
folder_number: "00016",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed16,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder17,
|
|
folder_number: "00017",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed17,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder18,
|
|
folder_number: "00018",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed18,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder19,
|
|
folder_number: "00019",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed19,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder20,
|
|
folder_number: "00020",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed20,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
{
|
|
uid: uidOfficeFolder21,
|
|
folder_number: "00021",
|
|
name: "Dossier",
|
|
deed_uid: uidDeed21,
|
|
status: EFolderStatus.LIVE,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
office_uid: uidOffice1,
|
|
description: null,
|
|
archived_description: null,
|
|
},
|
|
];
|
|
|
|
const deeds: Deeds[] = [
|
|
{
|
|
uid: uidDeed1,
|
|
deed_type_uid: uidDeedType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed2,
|
|
deed_type_uid: uidDeedType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed3,
|
|
deed_type_uid: uidDeedType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed4,
|
|
deed_type_uid: uidDeedType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed5,
|
|
deed_type_uid: uidDeedType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed6,
|
|
deed_type_uid: uidDeedType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed7,
|
|
deed_type_uid: uidDeedType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed8,
|
|
deed_type_uid: uidDeedType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed9,
|
|
deed_type_uid: uidDeedType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed10,
|
|
deed_type_uid: uidDeedType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed11,
|
|
deed_type_uid: uidDeedType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed12,
|
|
deed_type_uid: uidDeedType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed13,
|
|
deed_type_uid: uidDeedType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed14,
|
|
deed_type_uid: uidDeedType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed15,
|
|
deed_type_uid: uidDeedType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed16,
|
|
deed_type_uid: uidDeedType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed17,
|
|
deed_type_uid: uidDeedType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed18,
|
|
deed_type_uid: uidDeedType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed19,
|
|
deed_type_uid: uidDeedType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed20,
|
|
deed_type_uid: uidDeedType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeed21,
|
|
deed_type_uid: uidDeedType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
];
|
|
|
|
const deedTypes: DeedTypes[] = [
|
|
{
|
|
uid: uidDeedType1,
|
|
name: "Acte de donation",
|
|
archived_at: null,
|
|
description: "Acte de donation",
|
|
office_uid: uidOffice1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedType2,
|
|
name: "Acte de vente",
|
|
archived_at: null,
|
|
description: "Acte de vente",
|
|
office_uid: uidOffice1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedType3,
|
|
name: "Acte de succession",
|
|
archived_at: null,
|
|
description: "Acte de succession",
|
|
office_uid: uidOffice1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedType4,
|
|
name: "Acte de vente de maison individuelle",
|
|
archived_at: null,
|
|
description: "Acte de vente de maison individuelle",
|
|
office_uid: uidOffice1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
];
|
|
|
|
const documents: Documents[] = [
|
|
];
|
|
|
|
const documentTypes: DocumentTypes[] = [
|
|
{
|
|
uid: uidDocumentType1,
|
|
archived_at: null,
|
|
name: "Document d'identité",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document officiel d'identification utilisé par plusieurs personnes pour prouver leur identité et leur nationalité (CNI, passeport)",
|
|
public_description: "Document officiel d'identification utilisé par plusieurs personnes pour prouver leur identité et leur nationalité (CNI, passeport)",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType2,
|
|
archived_at: null,
|
|
name: "Taxe Foncière",
|
|
office_uid: uidOffice1,
|
|
private_description: "Impôt annuel imposé sur les propriétés foncières et utilisé pour financer les services publics locaux.",
|
|
public_description: "Impôt annuel imposé sur les propriétés foncières et utilisé pour financer les services publics locaux.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType3,
|
|
archived_at: null,
|
|
name: "Contrat Mariage",
|
|
office_uid: uidOffice1,
|
|
private_description: "Accord légal qui établit les droits et les obligations entre deux personnes s'unissant en mariage.",
|
|
public_description: "Accord légal qui établit les droits et les obligations entre deux personnes s'unissant en mariage.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType4,
|
|
archived_at: null,
|
|
name: "Livret de famille",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document officiel qui enregistre les détails et les événements familiaux tels que les mariages, les naissances et les décès d'un couple et de leurs enfants.",
|
|
public_description: "Document officiel qui enregistre les détails et les événements familiaux tels que les mariages, les naissances et les décès d'un couple et de leurs enfants.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType16,
|
|
archived_at: null,
|
|
name: "Bail commercial",
|
|
office_uid: uidOffice1,
|
|
private_description: "Contrat légal entre un propriétaire et un locataire pour la location d'un bien immobilier utilisé à des fins commerciales ou professionnelles.",
|
|
public_description: "Contrat légal entre un propriétaire et un locataire pour la location d'un bien immobilier utilisé à des fins commerciales ou professionnelles.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType5,
|
|
archived_at: null,
|
|
name: "Statuts SCI",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document légal qui définit les règles et les dispositions régissant la Société Civile Immobilière (SCI).",
|
|
public_description: "Document légal qui définit les règles et les dispositions régissant la Société Civile Immobilière (SCI).",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType6,
|
|
archived_at: null,
|
|
name: "Avis de taxe foncière",
|
|
office_uid: uidOffice1,
|
|
private_description: "Notification officielle indiquant le montant de l'impôt foncier dû sur une propriété.",
|
|
public_description: "Notification officielle indiquant le montant de l'impôt foncier dû sur une propriété.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType7,
|
|
archived_at: null,
|
|
name: "Appel de charge de copropriété",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document envoyé aux copropriétaires pour les informer des dépenses et des charges communes liées à la gestion et à l'entretien de l'immeuble.",
|
|
public_description: "Document envoyé aux copropriétaires pour les informer des dépenses et des charges communes liées à la gestion et à l'entretien de l'immeuble.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType8,
|
|
archived_at: null,
|
|
name: "PVAG",
|
|
office_uid: uidOffice1,
|
|
private_description: "Compte rendu écrit des discussions, décisions et résolutions prises lors d'une réunion d'assemblée générale de copropriété.",
|
|
public_description: "Compte rendu écrit des discussions, décisions et résolutions prises lors d'une réunion d'assemblée générale de copropriété.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType9,
|
|
archived_at: null,
|
|
name: "Règlement de copropriété",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document juridique qui établit les règles et les droits des copropriétaires d'un immeuble en copropriété.",
|
|
public_description: "Document juridique qui établit les règles et les droits des copropriétaires d'un immeuble en copropriété.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType10,
|
|
archived_at: null,
|
|
name: "Titre de propriété",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document légal qui atteste de la propriété d'un bien immobilier et en identifie le propriétaire.",
|
|
public_description: "Document légal qui atteste de la propriété d'un bien immobilier et en identifie le propriétaire.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType11,
|
|
archived_at: null,
|
|
name: "Plan et loi carrez",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document officiel qui mesure la superficie d'un lot ou d'un bien immobilier, conformément à la loi Carrez qui encadre les transactions immobilières.",
|
|
public_description: "Document officiel qui mesure la superficie d'un lot ou d'un bien immobilier, conformément à la loi Carrez qui encadre les transactions immobilières.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType12,
|
|
archived_at: null,
|
|
name: "CNI",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document officiel d'identification délivré par l'État pour prouver l'identité et la nationalité d'une personne.",
|
|
public_description: "Document officiel d'identification délivré par l'État pour prouver l'identité et la nationalité d'une personne.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType13,
|
|
archived_at: null,
|
|
name: "Modifications règlement copropriété (plusieurs)",
|
|
office_uid: uidOffice1,
|
|
private_description: "Documents légaux qui apportent des changements ou des ajustements aux règles et dispositions du règlement de copropriété initial.",
|
|
public_description: "Documents légaux qui apportent des changements ou des ajustements aux règles et dispositions du règlement de copropriété initial.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType14,
|
|
archived_at: null,
|
|
name: "Avis de décès",
|
|
office_uid: uidOffice1,
|
|
private_description: "Notification officielle délivrée par les autorités compétentes pour informer du décès d'une personne.",
|
|
public_description: "Notification officielle délivrée par les autorités compétentes pour informer du décès d'une personne.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType15,
|
|
archived_at: null,
|
|
name: "Lettre de mission",
|
|
office_uid: uidOffice1,
|
|
private_description: "Document contractuel qui définit les termes et les objectifs d'une mission confiée à une personne ou à une entreprise.",
|
|
public_description: "Document contractuel qui définit les termes et les objectifs d'une mission confiée à une personne ou à une entreprise.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType17,
|
|
archived_at: null,
|
|
name: "DPE",
|
|
office_uid: uidOffice1,
|
|
private_description: "Diagnostic de Performance Energétique.",
|
|
public_description: "Diagnostic de Performance Energétique.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDocumentType18,
|
|
archived_at: null,
|
|
name: "RIB",
|
|
office_uid: uidOffice1,
|
|
private_description: "Relevé d'identité bancaire ou IBAN.",
|
|
public_description: "Relevé d'identité bancaire ou IBAN.",
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
];
|
|
|
|
const officeFolderHasCustomers: OfficeFolderHasCustomers[] = [
|
|
{
|
|
uid: uidOfficeFolderHasCustomer1,
|
|
customer_uid: uidCustomer1,
|
|
office_folder_uid: uidOfficeFolder1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidOfficeFolderHasCustomer3,
|
|
customer_uid: uidCustomer3,
|
|
office_folder_uid: uidOfficeFolder3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidOfficeFolderHasCustomer4,
|
|
customer_uid: uidCustomer4,
|
|
office_folder_uid: uidOfficeFolder4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidOfficeFolderHasCustomer5,
|
|
customer_uid: uidCustomer2,
|
|
office_folder_uid: uidOfficeFolder21,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
];
|
|
|
|
const deedHasDocumentTypes: DeedHasDocumentTypes[] = [
|
|
{
|
|
uid: uidDeedHasDocumentType1,
|
|
deed_uid: uidDeed1,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType2,
|
|
deed_uid: uidDeed1,
|
|
document_type_uid: uidDocumentType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType3,
|
|
deed_uid: uidDeed1,
|
|
document_type_uid: uidDocumentType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType4,
|
|
deed_uid: uidDeed1,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType5,
|
|
deed_uid: uidDeed1,
|
|
document_type_uid: uidDocumentType16,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType6,
|
|
deed_uid: uidDeed1,
|
|
document_type_uid: uidDocumentType5,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType7,
|
|
deed_uid: uidDeed2,
|
|
document_type_uid: uidDocumentType6,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType8,
|
|
deed_uid: uidDeed2,
|
|
document_type_uid: uidDocumentType7,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType9,
|
|
deed_uid: uidDeed2,
|
|
document_type_uid: uidDocumentType8,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType10,
|
|
deed_uid: uidDeed2,
|
|
document_type_uid: uidDocumentType9,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType11,
|
|
deed_uid: uidDeed2,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType12,
|
|
deed_uid: uidDeed2,
|
|
document_type_uid: uidDocumentType11,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType13,
|
|
deed_uid: uidDeed2,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType19,
|
|
deed_uid: uidDeed3,
|
|
document_type_uid: uidDocumentType14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType20,
|
|
deed_uid: uidDeed3,
|
|
document_type_uid: uidDocumentType15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType21,
|
|
deed_uid: uidDeed3,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType22,
|
|
deed_uid: uidDeed3,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType23,
|
|
deed_uid: uidDeed3,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType14,
|
|
deed_uid: uidDeed4,
|
|
document_type_uid: uidDocumentType14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType15,
|
|
deed_uid: uidDeed4,
|
|
document_type_uid: uidDocumentType15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType26,
|
|
deed_uid: uidDeed4,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType27,
|
|
deed_uid: uidDeed4,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType28,
|
|
deed_uid: uidDeed4,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType29,
|
|
deed_uid: uidDeed5,
|
|
document_type_uid: uidDocumentType14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType30,
|
|
deed_uid: uidDeed5,
|
|
document_type_uid: uidDocumentType15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType31,
|
|
deed_uid: uidDeed5,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType32,
|
|
deed_uid: uidDeed5,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType33,
|
|
deed_uid: uidDeed5,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType34,
|
|
deed_uid: uidDeed6,
|
|
document_type_uid: uidDocumentType14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType35,
|
|
deed_uid: uidDeed6,
|
|
document_type_uid: uidDocumentType15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType36,
|
|
deed_uid: uidDeed6,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType37,
|
|
deed_uid: uidDeed6,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType38,
|
|
deed_uid: uidDeed6,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType39,
|
|
deed_uid: uidDeed7,
|
|
document_type_uid: uidDocumentType14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType40,
|
|
deed_uid: uidDeed7,
|
|
document_type_uid: uidDocumentType15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType41,
|
|
deed_uid: uidDeed7,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType42,
|
|
deed_uid: uidDeed7,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType43,
|
|
deed_uid: uidDeed7,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType44,
|
|
deed_uid: uidDeed8,
|
|
document_type_uid: uidDocumentType14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType45,
|
|
deed_uid: uidDeed8,
|
|
document_type_uid: uidDocumentType15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType46,
|
|
deed_uid: uidDeed8,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType47,
|
|
deed_uid: uidDeed8,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType48,
|
|
deed_uid: uidDeed8,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType49,
|
|
deed_uid: uidDeed9,
|
|
document_type_uid: uidDocumentType14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType50,
|
|
deed_uid: uidDeed9,
|
|
document_type_uid: uidDocumentType15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType51,
|
|
deed_uid: uidDeed9,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType16,
|
|
deed_uid: uidDeed9,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType17,
|
|
deed_uid: uidDeed9,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedHasDocumentType18,
|
|
deed_uid: uidDeed10,
|
|
document_type_uid: uidDocumentType14,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType24,
|
|
deed_uid: uidDeed10,
|
|
document_type_uid: uidDocumentType15,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType25,
|
|
deed_uid: uidDeed10,
|
|
document_type_uid: uidDocumentType4,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType52,
|
|
deed_uid: uidDeed10,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedHasDocumentType53,
|
|
deed_uid: uidDeed10,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
|
|
];
|
|
|
|
const deedTypeHasDocumentTypes: DeedTypeHasDocumentTypes[] = [
|
|
{
|
|
uid: uidDeedTypeHasDocumentType1,
|
|
deed_type_uid: uidDeedType1,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedTypeHasDocumentType2,
|
|
deed_type_uid: uidDeedType2,
|
|
document_type_uid: uidDocumentType2,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedTypeHasDocumentType3,
|
|
deed_type_uid: uidDeedType3,
|
|
document_type_uid: uidDocumentType3,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
|
|
{
|
|
uid: uidDeedTypeHasDocumentType4,
|
|
deed_type_uid: uidDeedType4,
|
|
document_type_uid: uidDocumentType1,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedTypeHasDocumentType5,
|
|
deed_type_uid: uidDeedType4,
|
|
document_type_uid: uidDocumentType6,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedTypeHasDocumentType6,
|
|
deed_type_uid: uidDeedType4,
|
|
document_type_uid: uidDocumentType10,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedTypeHasDocumentType7,
|
|
deed_type_uid: uidDeedType4,
|
|
document_type_uid: uidDocumentType17,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
{
|
|
uid: uidDeedTypeHasDocumentType8,
|
|
deed_type_uid: uidDeedType4,
|
|
document_type_uid: uidDocumentType18,
|
|
created_at: new Date(),
|
|
updated_at: new Date(),
|
|
},
|
|
];
|
|
|
|
|
|
for (const address of addresses) {
|
|
await prisma.addresses.create({ data: address });
|
|
}
|
|
|
|
for (const contact of contacts) {
|
|
await prisma.contacts.create({ data: contact });
|
|
}
|
|
|
|
for (const office of offices) {
|
|
await prisma.offices.create({ data: office });
|
|
}
|
|
|
|
for (const user of users) {
|
|
await prisma.users.create({ data: user });
|
|
}
|
|
|
|
for (const customer of customers) {
|
|
await prisma.customers.create({ data: customer });
|
|
}
|
|
|
|
for (const deedType of deedTypes) {
|
|
await prisma.deedTypes.create({ data: deedType });
|
|
}
|
|
|
|
for (const deed of deeds) {
|
|
await prisma.deeds.create({ data: deed });
|
|
}
|
|
for (const officeFolder of officeFolders) {
|
|
await prisma.officeFolders.create({ data: officeFolder });
|
|
}
|
|
|
|
for (const documentType of documentTypes) {
|
|
await prisma.documentTypes.create({ data: documentType });
|
|
}
|
|
|
|
for (const document of documents) {
|
|
await prisma.documents.create({ data: document });
|
|
}
|
|
|
|
for (const officeFolderHasCustomer of officeFolderHasCustomers) {
|
|
await prisma.officeFolderHasCustomers.create({ data: officeFolderHasCustomer });
|
|
}
|
|
|
|
for (const deedHasDocumentType of deedHasDocumentTypes) {
|
|
await prisma.deedHasDocumentTypes.create({ data: deedHasDocumentType });
|
|
}
|
|
|
|
for (const deedTypeHasDocumentType of deedTypeHasDocumentTypes) {
|
|
await prisma.deedTypeHasDocumentTypes.create({ data: deedTypeHasDocumentType });
|
|
}
|
|
|
|
console.log(">MOCK DATA - Seeding completed!");
|
|
})();
|