You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
561 B

const { Model } = require("objection");
const Knex = require("knex");
const knexConfig = require("../knexfile");
class User extends Model {
static get tableName() {
return "users";
}
static get jsonSchema() {
return {
type: "object",
required: ["username", "email"],
properties: {
id: { type: "integer" },
email: { type: "string" },
name: { type: "string", minLength: 1, maxLength: 255 },
},
};
}
}
module.exports = User;