s3 impl
This commit is contained in:
@@ -38,10 +38,25 @@ model IamRole {
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
policies IamRoleIamPolicyAttachment[]
|
||||
inlinePolicies IamRoleInlinePolicy[]
|
||||
|
||||
@@unique([accountId, name])
|
||||
}
|
||||
|
||||
model IamRoleInlinePolicy {
|
||||
id String @id @default(uuid())
|
||||
roleName String
|
||||
policyName String
|
||||
policyDocument String
|
||||
accountId String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
role IamRole @relation(fields: [accountId, roleName], references: [accountId, name], onDelete: Cascade)
|
||||
|
||||
@@unique([accountId, roleName, policyName])
|
||||
}
|
||||
|
||||
model IamPolicy {
|
||||
id String
|
||||
version Int @default(1)
|
||||
@@ -166,3 +181,51 @@ model Tag {
|
||||
|
||||
@@unique([arn, name])
|
||||
}
|
||||
|
||||
model S3Bucket {
|
||||
id String @id
|
||||
name String @unique
|
||||
tags String @default("{}")
|
||||
policy String?
|
||||
acl String @default("{\"Owner\":{\"ID\":\"local-user\",\"DisplayName\":\"local-user\"},\"Grants\":[]}")
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
objects S3Object[]
|
||||
}
|
||||
|
||||
model S3Object {
|
||||
id String @id
|
||||
bucketId String
|
||||
key String
|
||||
versionId String?
|
||||
content Bytes
|
||||
contentType String @default("application/octet-stream")
|
||||
size Int
|
||||
etag String
|
||||
metadata String @default("{}")
|
||||
storageClass String @default("STANDARD")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
bucket S3Bucket @relation(fields: [bucketId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([bucketId, key])
|
||||
@@index([bucketId])
|
||||
}
|
||||
|
||||
model ConsulKVEntry {
|
||||
key String @id
|
||||
value String // Base64 encoded
|
||||
flags BigInt @default(0)
|
||||
createIndex Int
|
||||
modifyIndex Int
|
||||
lockIndex Int @default(0)
|
||||
session String?
|
||||
datacenter String @default("dc1")
|
||||
namespace String @default("default")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([datacenter])
|
||||
@@index([namespace])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user