📖 Guide Documents
Utilization Cases
Prisma

Prisma

prisma.schema
model bbs_articles {
    id String @id @db.Uuid /// @format uuid
    created_at DateTime @db.Timestamptz
 
    /// @minItems 1
    snapshots bbs_article_snapshots[]
}
 
model bbs_article_snapshots {
    id String @id @db.Uuid /// @format uuid
    bbs_article_id String @db.Uuid /// @format uuid
    format String @db.VarChar
 
    /// @minLength 5
    /// @maxLength 80
    title String @db.VarChar
    body String
    created_at DateTime @db.Timestamptz
 
    article bbs_articles @relation(fields: [bbs_article_id], references: [id])
}

When defining prisma.schema file, you can write comment tags just by using /// statement.

After the definition, you utillize some validate function like typia.assert<T>(), for type safe insertion.