Export Examples
Given a simple User table in your schema:
export default table({ id: col.id(), email: col.email().unique(), name: col.name(),}).timestamps();TypeScript
Section titled “TypeScript”export interface User { id: string; email: string; name: string; created_at: Date;}type User struct { ID string `json:"id"` Email string `json:"email"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"`}Python
Section titled “Python”from dataclasses import dataclassfrom datetime import datetime
@dataclassclass User: id: str email: str name: str created_at: datetimeuse serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]pub struct User { pub id: String, pub email: String, pub name: String, pub created_at: chrono::DateTime<chrono::Utc>,}