Define casts for fields
import { Model } from 'pinia-orm'class User extends Model { static entity = 'users' static fields () { return { id: this.attr(null), firstName: this.string('') } } static casts () { return { firstName: 'string' } }}
import { Model } from 'pinia-orm'class User extends Model { static entity = 'users' static fields () { return { id: this.attr(null), age: this.number(0) } } static casts () { return { age: 'number' } }}
import { Model } from 'pinia-orm'class User extends Model { static entity = 'users' static fields () { return { id: this.attr(null), registered: this.boolean(false) } } static casts () { return { registered: 'boolean' } }}
import { Model } from 'pinia-orm'class User extends Model { static entity = 'users' static fields () { return { id: this.attr(null), meta: this.attr({}) } } static casts () { return { meta: 'array' } }}
import { Model, Attr, Cast } from 'pinia-orm'class User extends Model { static entity = 'users' @Cast('array') @Attr('{}') meta!: Record<string, any>}
export interface Casts { [name: string]: typeof CastAttribute | string}function casts(): Casts