Define fields which should be hidden
class User extends Model { static entity = 'users' // only return fields "name" and "phone" for this model by default static hidden = ['secret'] static fields () { return { id: this.uid(), name: this.string(''), phone: this.number(0), secret: this.string('') } }}
import { Model } from 'pinia-orm'import { Attr, Hidden, Uid } from 'pinia-orm/dist/decorators'class User extends Model { static entity = 'users' @Uid() declare id: string @Attr('{}') declare name: string @Hidden() @Attr('{}') declare secret: string}
const visible: hidden[] = []