Skip to content
Snippets Groups Projects
entities.ts 1.47 KiB
Newer Older
import type { IEntity } from '@/app/interfaces/environment';

export interface ITable extends IEntity {
  entity_type: 'table';
  entity_uuid: string;
malyusgun's avatar
malyusgun committed
  title?: string | null;
  text?: string | null;
  table_columns: ITableColumn[];
  table_data: {
malyusgun's avatar
malyusgun committed
    [key: string]: never;
malyusgun's avatar
malyusgun committed
export interface ITableColumn {
  column_uuid: string;
  name: string;
  type: ITableColumnTypes;
malyusgun's avatar
malyusgun committed
  data: never;
}
type ITableColumnTypes =
  | 'text'
  | 'number'
  | 'select'
  | 'multiselect'
  | 'checkbox'
  | 'status'
  | 'rating'
  | 'knob';
export interface IDivider extends IEntity {
  entity_type: 'divider';
  entity_uuid: string;
  divider_height: number;
  divider_type: 'solid' | 'dashed' | 'dotted';
}

export interface IParagraph extends IEntity {
  entity_type: 'paragraph';
  entity_uuid: string;
malyusgun's avatar
malyusgun committed
  title?: string | null;
  font_size?: '16' | '20' | '24' | '40' | '64';
  paragraph_size?: 'full' | 'half';
  entity_title_position: 'left' | 'center' | 'right';
  entity_position: 'left' | 'center' | 'right';
export interface IImage extends IEntity {
  entity_type: 'image';
  entity_uuid: string;
malyusgun's avatar
malyusgun committed
  title?: string | null;
  text?: string | null;
  font_size?: '16' | '20' | '24' | '40' | '64' | null;
  paragraph_size?: 'full' | 'half' | null;
  text_position?: 'left' | 'right' | null;
  imageUrl: string;
  image_width: number;
  image_height: number;
  image_scale: string;
  entity_title_position: 'left' | 'center' | 'right';
  entity_position: 'left' | 'center' | 'right';