river-of-ebooks/api/models/Book.js

40 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-10-24 03:13:56 +00:00
/**
* Book.js
*
* @description :: A model definition. Represents a database table/collection/etc.
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
2018-10-31 18:54:58 +00:00
id: {
2018-10-31 21:05:27 +00:00
type: 'number',
2018-10-31 18:54:58 +00:00
unique: true,
2019-02-04 21:35:12 +00:00
autoIncrement: true
2018-10-31 18:54:58 +00:00
},
title: { type: 'string', required: true },
author: { type: 'string' },
publisher: { type: 'string' },
2019-03-14 16:41:50 +00:00
identifier: { type: 'string' },
2019-02-20 18:38:25 +00:00
version: { type: 'string' },
2019-03-05 20:39:07 +00:00
hostname: { type: 'string' },
2019-04-01 21:09:11 +00:00
opds: { type: 'json' },
tags: { type: 'string' }
2018-10-24 03:13:56 +00:00
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
}
2018-10-24 03:13:56 +00:00
2018-11-07 20:06:36 +00:00
}