Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return AuthorModel.getQuerySetFromIds(authorIds);
}
}
Publisher.modelName = 'Publisher';
class Genre extends CRUDModel {
static validate(props) {
if (props.name && props.name.length > 0) {
return true;
}
return false;
}
}
Genre.modelName = 'Genre';
const schema = new Schema();
schema.register(Author, Book, Publisher, Genre);
export {
Book,
Author,
Publisher,
Genre,
schema,
};
text: PropTypes.string.isRequired,
done: PropTypes.bool.isRequired,
user: PropTypes.oneOfType([
PropTypes.instanceOf(User),
PropTypes.number,
]).isRequired,
tags: PropTypes.arrayOf(PropTypes.oneOfType([
PropTypes.instanceOf(Tag),
PropTypes.string,
])).isRequired,
};
Todo.defaultProps = {
done: false,
};
export const schema = new Schema();
schema.register(Todo, Tag, User);
export default schema;