Service - CssStyles: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 7: Line 7:
https://bitbucket.org/izara-core-shared/izara-core-shared-cssstyles
https://bitbucket.org/izara-core-shared/izara-core-shared-cssstyles


= DynamoDB tables =
= ObjectSchema =


== [[Standard Config Table Per Service]] ==
== cssStyle ==


=== Configuration tags ===
<syntaxhighlight lang="JavaScript">
[
  {
    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"
      },
    ],
  },
]


<syntaxhighlight lang="JavaScript">
{
configKey: "xx",
configTag: "xx",
configValue: "xx",
},
</syntaxhighlight>
</syntaxhighlight>
= DynamoDB tables =


== CssStyleMain ==
== CssStyleMain ==
Line 27: Line 75:
cssStyleId: "xx", // {useCase}_{random uuid}
cssStyleId: "xx", // {useCase}_{random uuid}
cssStyle: "xx", // block of css formatting
cssStyle: "xx", // block of css formatting
cssStyleName: "yy", // user specified name for the css style
userId: "xx"
userId: "xx"
}
}
</syntaxhighlight>
</syntaxhighlight>


Line 45: Line 95:


* partition key: userId
* partition key: userId
* sort key: {none}
* sort key: cssStyleId


= Working documents =
= Working documents =

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

Working documents

CssStyles