spherehq/sphere

View on GitHub
packages/database/schemas/post.prisma

Summary

Maintainability
Test Coverage
enum POST_STATUS {
PUBLISHED
DRAFT
ARCHIVED
}
 
type Post {
id: ID! @id
title: String!
featuredImage: String!
slug: String! @unique
url: String! @unique
timeToRead: Int! @default(value: 1)
publishedAt: DateTime
createdAt: DateTime! @createdAt
updatedAt: DateTime! @updatedAt
status: POST_STATUS! @default(value: DRAFT)
author: String
associatedWith: Sphere!
@relation(name: "PostAssociatedWithSphere")
}