2025-05-10 02:09:06 +02:00
|
|
|
/*!
|
|
|
|
|
* Copyright (c) 2024 PLANKA Software GmbH
|
|
|
|
|
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
|
|
|
|
*/
|
|
|
|
|
|
2019-08-31 04:07:25 +05:00
|
|
|
/**
|
2025-05-10 02:09:06 +02:00
|
|
|
* CustomField.js
|
2019-08-31 04:07:25 +05:00
|
|
|
*
|
|
|
|
|
* @description :: A model definition represents a database table/collection.
|
|
|
|
|
* @docs :: https://sailsjs.com/docs/concepts/models-and-orm/models
|
|
|
|
|
*/
|
|
|
|
|
|
2025-09-08 16:20:27 +02:00
|
|
|
/**
|
|
|
|
|
* @swagger
|
|
|
|
|
* components:
|
|
|
|
|
* schemas:
|
|
|
|
|
* CustomField:
|
|
|
|
|
* type: object
|
|
|
|
|
* required:
|
2025-09-08 23:40:36 +02:00
|
|
|
* - id
|
2025-09-08 16:20:27 +02:00
|
|
|
* - position
|
|
|
|
|
* - name
|
|
|
|
|
* - showOnFrontOfCard
|
|
|
|
|
* properties:
|
|
|
|
|
* id:
|
|
|
|
|
* type: string
|
|
|
|
|
* description: Unique identifier for the custom field
|
2025-09-08 19:14:31 +02:00
|
|
|
* example: "1357158568008091264"
|
2025-09-08 16:20:27 +02:00
|
|
|
* baseCustomFieldGroupId:
|
|
|
|
|
* type: string
|
|
|
|
|
* nullable: true
|
|
|
|
|
* description: ID of the base custom field group the custom field belongs to
|
2025-09-08 19:14:31 +02:00
|
|
|
* example: "1357158568008091265"
|
2025-09-08 16:20:27 +02:00
|
|
|
* customFieldGroupId:
|
|
|
|
|
* type: string
|
|
|
|
|
* nullable: true
|
|
|
|
|
* description: ID of the custom field group the custom field belongs to
|
2025-09-08 19:14:31 +02:00
|
|
|
* example: "1357158568008091266"
|
2025-09-08 16:20:27 +02:00
|
|
|
* position:
|
|
|
|
|
* type: number
|
|
|
|
|
* description: Position of the custom field within the group
|
|
|
|
|
* example: 65536
|
|
|
|
|
* name:
|
|
|
|
|
* type: string
|
|
|
|
|
* description: Name/title of the custom field
|
|
|
|
|
* example: Priority
|
|
|
|
|
* showOnFrontOfCard:
|
|
|
|
|
* type: boolean
|
|
|
|
|
* description: Whether to show the field on the front of cards
|
|
|
|
|
* example: true
|
|
|
|
|
* createdAt:
|
|
|
|
|
* type: string
|
|
|
|
|
* format: date-time
|
|
|
|
|
* nullable: true
|
|
|
|
|
* description: When the custom field was created
|
|
|
|
|
* example: 2024-01-01T00:00:00.000Z
|
|
|
|
|
* updatedAt:
|
|
|
|
|
* type: string
|
|
|
|
|
* format: date-time
|
|
|
|
|
* nullable: true
|
|
|
|
|
* description: When the custom field was last updated
|
|
|
|
|
* example: 2024-01-01T00:00:00.000Z
|
|
|
|
|
*/
|
|
|
|
|
|
2019-08-31 04:07:25 +05:00
|
|
|
module.exports = {
|
|
|
|
|
attributes: {
|
|
|
|
|
// ╔═╗╦═╗╦╔╦╗╦╔╦╗╦╦ ╦╔═╗╔═╗
|
|
|
|
|
// ╠═╝╠╦╝║║║║║ ║ ║╚╗╔╝║╣ ╚═╗
|
|
|
|
|
// ╩ ╩╚═╩╩ ╩╩ ╩ ╩ ╚╝ ╚═╝╚═╝
|
|
|
|
|
|
2025-05-10 02:09:06 +02:00
|
|
|
position: {
|
|
|
|
|
type: 'number',
|
2019-08-31 04:07:25 +05:00
|
|
|
required: true,
|
|
|
|
|
},
|
2025-05-10 02:09:06 +02:00
|
|
|
name: {
|
2019-10-10 02:51:54 +05:00
|
|
|
type: 'string',
|
2019-08-31 04:07:25 +05:00
|
|
|
required: true,
|
|
|
|
|
},
|
2025-05-10 02:09:06 +02:00
|
|
|
showOnFrontOfCard: {
|
|
|
|
|
type: 'boolean',
|
2019-08-31 04:07:25 +05:00
|
|
|
required: true,
|
2025-05-10 02:09:06 +02:00
|
|
|
columnName: 'show_on_front_of_card',
|
2019-11-05 18:01:42 +05:00
|
|
|
},
|
2019-08-31 04:07:25 +05:00
|
|
|
|
|
|
|
|
// ╔═╗╔╦╗╔╗ ╔═╗╔╦╗╔═╗
|
|
|
|
|
// ║╣ ║║║╠╩╗║╣ ║║╚═╗
|
|
|
|
|
// ╚═╝╩ ╩╚═╝╚═╝═╩╝╚═╝
|
|
|
|
|
|
|
|
|
|
// ╔═╗╔═╗╔═╗╔═╗╔═╗╦╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
|
|
|
|
// ╠═╣╚═╗╚═╗║ ║║ ║╠═╣ ║ ║║ ║║║║╚═╗
|
|
|
|
|
// ╩ ╩╚═╝╚═╝╚═╝╚═╝╩╩ ╩ ╩ ╩╚═╝╝╚╝╚═╝
|
2025-05-10 02:09:06 +02:00
|
|
|
|
|
|
|
|
baseCustomFieldGroupId: {
|
|
|
|
|
model: 'BaseCustomFieldGroup',
|
|
|
|
|
columnName: 'base_custom_field_group_id',
|
|
|
|
|
},
|
|
|
|
|
customFieldGroupId: {
|
|
|
|
|
model: 'CustomFieldGroup',
|
|
|
|
|
columnName: 'custom_field_group_id',
|
|
|
|
|
},
|
2019-08-31 04:07:25 +05:00
|
|
|
},
|
|
|
|
|
|
2025-05-10 02:09:06 +02:00
|
|
|
tableName: 'custom_field',
|
2019-08-31 04:07:25 +05:00
|
|
|
};
|