Naming

The naming of all parts of an application plan are subject to a naming convention.

The naming convention is important, because the name of one part is used for one or multiple purposes in the generated code.

The same name in the plan might name multiple parts in the code or other assets. Depending on the programming language, the part of the application being named, or the type of asset, the target naming conventions vary. This is why the source naming convention in the plan is very simple.

Naming convention

The name can only contain lower case letters, white spaces and numbers.

Example

The example shows the Readmodel of a Projection use case of the Task App

The name is task overview.

  • In line 1 task overview translates into task_overview of task_task_overview.
  • In line 2 task overview translates into TaskOverview of TaskOverviewEntity.
  • In line 14 task overview translates into TaskOverview.
1@Entity('task_task_overview')
2export class TaskOverviewEntity extends BaseEntity {
3 @PrimaryColumn({ name: 'task_id', type: 'uuid'})
4 taskId: string;
5 @Column({ name: 'title', type: 'text'})
6 title: string;
7 @Column({ name: 'description', type: 'text'})
8 description: string;
9 @Column({ name: 'assignee_id', type: 'uuid'})
10 assigneeId: string;
11 @Column({ name: 'status', type: 'text'})
12 status: TaskStatusEnum;
13
14 constructor(props?: TaskOverview) {
15 super();
16 if (props){
17 this.taskId = props.taskId;
18 this.title = props.title;
19 this.description = props.description;
20 this.assigneeId = props.assigneeId;
21 this.status = props.status;
22 }
23 }
24}

© 2024 Codebricks | All rights reserved.