Service - CssStyles: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 10: | Line 10: | ||
== cssStyle == | == cssStyle == | ||
<syntaxhighlight lang="JavaScript"> | <syntaxhighlight lang="JavaScript"> | ||
| Line 76: | Line 63: | ||
}, | }, | ||
] | ] | ||
</syntaxhighlight> | |||
= DynamoDB tables = | |||
== CssStyleMain == | |||
<syntaxhighlight lang="JavaScript"> | |||
{ | |||
cssStyleId: "xx", // {useCase}_{random uuid} | |||
cssStyle: "xx", // block of css formatting | |||
cssStyleName: "yy", // user specified name for the css style | |||
userId: "xx" | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 02:44, 17 July 2025
Overview
Manages styles created by users and used in different areas of the project.
Repository
https://bitbucket.org/izara-core-shared/izara-core-shared-cssstyles
ObjectSchema
cssStyle
[
{
objectType: "cssStyle",
storageResources: {
"dynamodb": {
storageType: "dynamoDB",
tableName: "CssStyleMain",
}
},
fieldNames: {
cssStyleId: {
type: "string",
randomOnCreate: true,
requiredOnCreate: false,
optionalOnCreate: false,
canUpdate: false,
storageResourceTags: ['dynamodb'],
},
cssStyle: {
type: "object",
randomOnCreate: false,
requiredOnCreate: true,
optionalOnCreate: false,
canUpdate: true,
storageResourceTags: ['dynamodb'],
},
cssStyleName: {
type: "string",
randomOnCreate: false,
requiredOnCreate: true,
optionalOnCreate: false,
canUpdate: true,
storageResourceTags: ['dynamodb'],
},
userId: {
type: "string",
randomOnCreate: false,
requiredOnCreate: true,
optionalOnCreate: false,
canUpdate: false,
storageResourceTags: ['dynamodb'],
},
},
identifiers: [
{
type: "partitionKey",
fieldNames: "cssStyleId"
},
],
},
]
DynamoDB tables
CssStyleMain
{
cssStyleId: "xx", // {useCase}_{random uuid}
cssStyle: "xx", // block of css formatting
cssStyleName: "yy", // user specified name for the css style
userId: "xx"
}
- partition key: cssStyleId
- sort key: {none}
- save cssStyles according to useCase, eg cssStyles for each tabled data element type (tableDataMain/tableDataGrouping/tableDataRow/tableDataCell/tableDataElement)
UsersCssStyles
{
userId: "xx" // user who owns the cssStyle
cssStyleId: "xx",
}
- partition key: userId
- sort key: cssStyleId