Skip to content

Instantly share code, notes, and snippets.

@kauemurakami
Created June 1, 2020 18:04
Show Gist options
  • Save kauemurakami/d4ed76b0fffa6406793b2e007f2a8f26 to your computer and use it in GitHub Desktop.
Save kauemurakami/d4ed76b0fffa6406793b2e007f2a8f26 to your computer and use it in GitHub Desktop.
Classe Client
import { DATA_TYPES, Model } from 'https://deno.land/x/denodb/mod.ts'
export default class Client extends Model {
static table = "clients"
static timestamps = true
static fields = {
id : {
primaryKey : true,
autoIncrement: true
},
name : DATA_TYPES.STRING,
email : DATA_TYPES.STRING,
password : DATA_TYPES.STRING,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment