add archived to files on delete
This commit is contained in:
parent
6904d1be02
commit
9c84f99598
@ -48,7 +48,7 @@
|
|||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
"jsonwebtoken": "^9.0.0",
|
"jsonwebtoken": "^9.0.0",
|
||||||
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.46",
|
"le-coffre-resources": "git@github.com:smart-chain-fr/leCoffre-resources.git#v2.47",
|
||||||
"module-alias": "^2.2.2",
|
"module-alias": "^2.2.2",
|
||||||
"multer": "^1.4.5-lts.1",
|
"multer": "^1.4.5-lts.1",
|
||||||
"next": "^13.1.5",
|
"next": "^13.1.5",
|
||||||
|
@ -0,0 +1,2 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "files" ADD COLUMN "archived_at" TIMESTAMP(3);
|
@ -39,7 +39,7 @@ model Contacts {
|
|||||||
cell_phone_number String @unique @db.VarChar(50)
|
cell_phone_number String @unique @db.VarChar(50)
|
||||||
civility ECivility @default(MALE)
|
civility ECivility @default(MALE)
|
||||||
address Addresses? @relation(fields: [address_uid], references: [uid], onDelete: Cascade)
|
address Addresses? @relation(fields: [address_uid], references: [uid], onDelete: Cascade)
|
||||||
address_uid String? @unique @db.VarChar(255)
|
address_uid String? @unique @db.VarChar(255)
|
||||||
birthdate DateTime?
|
birthdate DateTime?
|
||||||
created_at DateTime? @default(now())
|
created_at DateTime? @default(now())
|
||||||
updated_at DateTime? @updatedAt
|
updated_at DateTime? @updatedAt
|
||||||
@ -204,6 +204,7 @@ model Files {
|
|||||||
document_uid String @db.VarChar(255)
|
document_uid String @db.VarChar(255)
|
||||||
file_path String @unique @db.VarChar(255)
|
file_path String @unique @db.VarChar(255)
|
||||||
file_name String @db.VarChar(255)
|
file_name String @db.VarChar(255)
|
||||||
|
archived_at DateTime?
|
||||||
key String? @db.VarChar(255)
|
key String? @db.VarChar(255)
|
||||||
created_at DateTime? @default(now())
|
created_at DateTime? @default(now())
|
||||||
updated_at DateTime? @updatedAt
|
updated_at DateTime? @updatedAt
|
||||||
|
@ -429,6 +429,7 @@ import {
|
|||||||
file_name: "fileName1",
|
file_name: "fileName1",
|
||||||
file_path: "https://www.google1.com",
|
file_path: "https://www.google1.com",
|
||||||
key: '',
|
key: '',
|
||||||
|
archived_at: null,
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
updated_at: new Date(),
|
updated_at: new Date(),
|
||||||
},
|
},
|
||||||
@ -438,6 +439,7 @@ import {
|
|||||||
file_name: "fileName2",
|
file_name: "fileName2",
|
||||||
file_path: "https://www.google2.com",
|
file_path: "https://www.google2.com",
|
||||||
key: '',
|
key: '',
|
||||||
|
archived_at: null,
|
||||||
created_at: new Date(),
|
created_at: new Date(),
|
||||||
updated_at: new Date(),
|
updated_at: new Date(),
|
||||||
},
|
},
|
||||||
|
@ -66,7 +66,8 @@ export default class FilesRepository extends BaseRepository {
|
|||||||
uid: uid,
|
uid: uid,
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
key: null
|
key: null,
|
||||||
|
archived_at: new Date(Date.now())
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user