rapida-partner 1.9.0 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rapidaObject.json +882 -635
- package/src/examples/components/forms/character.form.ts +2 -2
- package/src/examples/components/forms/movie.form.ts +51 -27
- package/src/examples/components/forms/movieEpisode.form.ts +37 -38
- package/src/examples/components/forms/movieGenre.form.ts +18 -18
- package/src/examples/components/forms/test.form.ts +125 -0
- package/src/examples/components/lists/character.list.ts +23 -3
- package/src/examples/components/lists/movie.list.ts +34 -6
- package/src/examples/components/lists/movieEpisode.list.ts +31 -3
- package/src/examples/components/lists/movieGenre.list.ts +29 -3
- package/src/examples/modules/movie.ts +2 -3
- package/src/examples/projects/movieBackoffice.ts +2 -2
- package/src/interfaces/form-array.interface.ts +1 -1
- package/src/interfaces/form-flowchart.interface.ts +22 -0
- package/src/interfaces/form.interface.ts +6 -0
- package/src/interfaces/list.interface.ts +2 -0
- package/src/schemas/form-array.ref.json +2 -2
- package/src/schemas/form-flowchart-action-with-element.ref.json +29 -0
- package/src/schemas/form-flowchart-actor.ref.json +20 -0
- package/src/schemas/form-flowchart-element.ref.json +14 -0
- package/src/schemas/form-flowchart.ref.json +14 -0
- package/src/schemas/form.ref.json +3 -0
- package/src/schemas/list.ref.json +6 -0
- package/src/examples/components/lists/company.list.ts +0 -49
- package/src/examples/components/lists/customer.list.ts +0 -50
- package/src/examples/components/lists/person.list.ts +0 -50
|
@@ -12,10 +12,10 @@ export const characterForm: IForm = {
|
|
|
12
12
|
endpoint: "/characters",
|
|
13
13
|
actions: ["create", "get", "getById", "update", "delete"],
|
|
14
14
|
request: {
|
|
15
|
-
entity: "
|
|
15
|
+
entity: "characters",
|
|
16
16
|
description: "Represents a character in a story or narrative.",
|
|
17
17
|
fields: [
|
|
18
|
-
{ name: "
|
|
18
|
+
{ name: "id", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, isPrimaryKey: true },
|
|
19
19
|
{ name: "characterName", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
20
20
|
{ name: "characterImage", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
21
21
|
{ name: "characterDescription", dataType: EDataType.LONGTEXT, isRequired: false },
|
|
@@ -5,33 +5,6 @@ export const movieForm: IForm = {
|
|
|
5
5
|
title: "Gerenciar filme",
|
|
6
6
|
userStory: `Como um usuário autorizado, eu quero usar o formulário de gerenciamento de filmes para cadastrar e editar filmes, incluindo a foto, o nome, a descrição, a data de lançamento, a pontuação no IMDb e os gêneros associados. Quero também ter a opção de adicionar e gerenciar episódios, incluindo seus títulos, descrições, datas de lançamento e personagens relacionados. Isso me permite manter um registro completo e detalhado do conteúdo audiovisual no sistema.`,
|
|
7
7
|
componentType: "form",
|
|
8
|
-
contracts: [
|
|
9
|
-
{
|
|
10
|
-
id: "movies",
|
|
11
|
-
endpoint: "/movies",
|
|
12
|
-
actions: ["create", "update", "getById", "get", "delete"],
|
|
13
|
-
request: {
|
|
14
|
-
entity: "Movie",
|
|
15
|
-
description: "Represents a movie or TV series in the system.",
|
|
16
|
-
fields: [
|
|
17
|
-
{ name: "_id", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, isPrimaryKey: true },
|
|
18
|
-
{ name: "pictureFile", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
19
|
-
{ name: "name", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
20
|
-
{ name: "description", dataType: EDataType.LONGTEXT, isRequired: true },
|
|
21
|
-
{ name: "releaseDate", dataType: EDataType.DATE, isRequired: true },
|
|
22
|
-
{ name: "imdbRating", dataType: EDataType.DECIMAL, isRequired: true },
|
|
23
|
-
{ name: "movieGenres", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, foreignKey: {
|
|
24
|
-
entity: "MovieGenre",
|
|
25
|
-
connectionAttribute: "_id",
|
|
26
|
-
relationship: "many-to-many"
|
|
27
|
-
} },
|
|
28
|
-
{ name: "link1", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
29
|
-
{ name: "link2", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
30
|
-
{ name: "link3", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
31
|
-
],
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
],
|
|
35
8
|
id: "movieForm",
|
|
36
9
|
guards: "isAuthorized",
|
|
37
10
|
elements: [
|
|
@@ -122,4 +95,55 @@ export const movieForm: IForm = {
|
|
|
122
95
|
],
|
|
123
96
|
},
|
|
124
97
|
],
|
|
98
|
+
contracts: [
|
|
99
|
+
{
|
|
100
|
+
id: "movies",
|
|
101
|
+
endpoint: "/movies",
|
|
102
|
+
actions: ["create", "update", "getById", "get", "delete"],
|
|
103
|
+
request: {
|
|
104
|
+
entity: "Movie",
|
|
105
|
+
description: "Represents a movie or TV series in the system.",
|
|
106
|
+
fields: [
|
|
107
|
+
{ name: "id", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, isPrimaryKey: true },
|
|
108
|
+
{ name: "pictureFile", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
109
|
+
{ name: "name", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
110
|
+
{ name: "description", dataType: EDataType.LONGTEXT, isRequired: true },
|
|
111
|
+
{ name: "releaseDate", dataType: EDataType.DATE, isRequired: true },
|
|
112
|
+
{ name: "imdbRating", dataType: EDataType.DECIMAL, isRequired: true },
|
|
113
|
+
{ name: "movieGenres", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, foreignKey: {
|
|
114
|
+
entity: "MovieGenre",
|
|
115
|
+
connectionAttribute: "_id",
|
|
116
|
+
relationship: "many-to-many"
|
|
117
|
+
} },
|
|
118
|
+
{ name: "link1", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
119
|
+
{ name: "link2", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
120
|
+
{ name: "link3", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
121
|
+
],
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
flowChart: {
|
|
126
|
+
actors: [
|
|
127
|
+
{
|
|
128
|
+
name: "Usuário",
|
|
129
|
+
actionsWithElements: [
|
|
130
|
+
{
|
|
131
|
+
verb: "create",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
verb: "update",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
verb: "get",
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
verb: "getById",
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
verb: "delete",
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
125
149
|
};
|
|
@@ -5,64 +5,36 @@ export const movieEpisodeForm: IForm = {
|
|
|
5
5
|
title: "Gerenciar episódio",
|
|
6
6
|
componentType: "form",
|
|
7
7
|
id: "movieEpisodeForm",
|
|
8
|
-
contracts: [
|
|
9
|
-
{
|
|
10
|
-
id: "moviesEpisodes",
|
|
11
|
-
endpoint: "/movies-episodes",
|
|
12
|
-
actions: ["create", "get", "getById", "update", "delete"],
|
|
13
|
-
request: {
|
|
14
|
-
entity: "MovieEpisode",
|
|
15
|
-
description: "Represents an episode of a TV series or show.",
|
|
16
|
-
fields: [
|
|
17
|
-
{ name: "_id", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, isPrimaryKey: true },
|
|
18
|
-
{ name: "movieId", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, foreignKey: {
|
|
19
|
-
entity: "Movie",
|
|
20
|
-
connectionAttribute: "_id",
|
|
21
|
-
relationship: "one-to-many"
|
|
22
|
-
} },
|
|
23
|
-
{ name: "title", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
24
|
-
{ name: "description", dataType: EDataType.LONGTEXT, isRequired: true },
|
|
25
|
-
{ name: "releaseDate", dataType: EDataType.DATETIME2, isRequired: true },
|
|
26
|
-
{ name: "characters", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: false, foreignKey: {
|
|
27
|
-
entity: "Character",
|
|
28
|
-
connectionAttribute: "_id",
|
|
29
|
-
relationship: "many-to-many"
|
|
30
|
-
} },
|
|
31
|
-
],
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
8
|
elements: [
|
|
36
9
|
{
|
|
37
|
-
|
|
38
|
-
id: "episodes",
|
|
10
|
+
label: "Episódio",
|
|
39
11
|
name: "episodes",
|
|
40
|
-
|
|
12
|
+
type: EDataType.ARRAY,
|
|
41
13
|
elements: [
|
|
42
14
|
{
|
|
43
|
-
type: "input",
|
|
44
|
-
dataType: EDataType.TEXT,
|
|
45
15
|
label: "Título do episódio",
|
|
46
16
|
name: "episodeTitle",
|
|
17
|
+
type: "input",
|
|
18
|
+
dataType: EDataType.TEXT,
|
|
47
19
|
isRequired: true,
|
|
48
20
|
},
|
|
49
21
|
{
|
|
50
|
-
type: "input",
|
|
51
|
-
dataType: EDataType.WYSIWYG,
|
|
52
22
|
label: "Descrição do episódio",
|
|
53
23
|
name: "episodeDescription",
|
|
24
|
+
type: "input",
|
|
25
|
+
dataType: EDataType.WYSIWYG,
|
|
54
26
|
},
|
|
55
27
|
{
|
|
56
|
-
type: "input",
|
|
57
|
-
dataType: EDataType.DATE,
|
|
58
28
|
label: "Data de lançamento do episódio",
|
|
59
29
|
name: "episodeReleaseDate",
|
|
30
|
+
type: "input",
|
|
31
|
+
dataType: EDataType.DATE,
|
|
60
32
|
},
|
|
61
33
|
{
|
|
62
|
-
type: "autocomplete",
|
|
63
|
-
dataType: EDataType.TEXT,
|
|
64
34
|
name: "charactersId",
|
|
65
35
|
label: "Personagens no episódio",
|
|
36
|
+
type: "autocomplete",
|
|
37
|
+
dataType: EDataType.TEXT,
|
|
66
38
|
optionsApi: {
|
|
67
39
|
endpoint: "/characters",
|
|
68
40
|
labelField: ["characterName"],
|
|
@@ -75,4 +47,31 @@ export const movieEpisodeForm: IForm = {
|
|
|
75
47
|
],
|
|
76
48
|
},
|
|
77
49
|
],
|
|
50
|
+
contracts: [
|
|
51
|
+
{
|
|
52
|
+
id: "moviesEpisodes",
|
|
53
|
+
endpoint: "/movies-episodes",
|
|
54
|
+
actions: ["create", "get", "getById", "update", "delete"],
|
|
55
|
+
request: {
|
|
56
|
+
entity: "MovieEpisode",
|
|
57
|
+
description: "Represents an episode of a TV series or show.",
|
|
58
|
+
fields: [
|
|
59
|
+
{ name: "_id", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, isPrimaryKey: true },
|
|
60
|
+
{ name: "movieId", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, foreignKey: {
|
|
61
|
+
entity: "Movie",
|
|
62
|
+
connectionAttribute: "_id",
|
|
63
|
+
relationship: "one-to-many"
|
|
64
|
+
} },
|
|
65
|
+
{ name: "title", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
66
|
+
{ name: "description", dataType: EDataType.LONGTEXT, isRequired: true },
|
|
67
|
+
{ name: "releaseDate", dataType: EDataType.DATETIME2, isRequired: true },
|
|
68
|
+
{ name: "characters", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: false, foreignKey: {
|
|
69
|
+
entity: "Character",
|
|
70
|
+
connectionAttribute: "_id",
|
|
71
|
+
relationship: "many-to-many"
|
|
72
|
+
} },
|
|
73
|
+
],
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
],
|
|
78
77
|
}
|
|
@@ -5,6 +5,24 @@ export const movieGenreForm: IForm = {
|
|
|
5
5
|
title: "Gerenciar gênero de filme",
|
|
6
6
|
userStory: `Como um usuário autorizado, eu quero usar o formulário de gerenciamento de gênero de filme para criar e editar gêneros de filmes, fornecendo um nome e uma descrição para cada um. Isso me permite organizar e categorizar filmes de forma precisa no sistema.`,
|
|
7
7
|
componentType: "form",
|
|
8
|
+
id: "movieGenreForm",
|
|
9
|
+
guards: "isAuthorized",
|
|
10
|
+
elements: [
|
|
11
|
+
{
|
|
12
|
+
type: "input",
|
|
13
|
+
dataType: EDataType.TEXT,
|
|
14
|
+
label: "Nome",
|
|
15
|
+
name: "name",
|
|
16
|
+
isRequired: true,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: "input",
|
|
20
|
+
dataType: EDataType.WYSIWYG,
|
|
21
|
+
label: "Descrição",
|
|
22
|
+
name: "description",
|
|
23
|
+
isRequired: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
8
26
|
contracts: [
|
|
9
27
|
{
|
|
10
28
|
id: "moviesGenres",
|
|
@@ -30,22 +48,4 @@ export const movieGenreForm: IForm = {
|
|
|
30
48
|
}
|
|
31
49
|
}
|
|
32
50
|
],
|
|
33
|
-
id: "movieGenreForm",
|
|
34
|
-
guards: "isAuthorized",
|
|
35
|
-
elements: [
|
|
36
|
-
{
|
|
37
|
-
type: "input",
|
|
38
|
-
dataType: EDataType.TEXT,
|
|
39
|
-
label: "Nome",
|
|
40
|
-
name: "name",
|
|
41
|
-
isRequired: true,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: "input",
|
|
45
|
-
dataType: EDataType.WYSIWYG,
|
|
46
|
-
label: "Descrição",
|
|
47
|
-
name: "description",
|
|
48
|
-
isRequired: true,
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
51
|
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { EDataType } from "../../../enums/form.enum";
|
|
2
|
+
import type { IForm } from "../../../interfaces/form.interface";
|
|
3
|
+
|
|
4
|
+
export const testForm: IForm = {
|
|
5
|
+
title: "Formulário teste",
|
|
6
|
+
componentType: "form",
|
|
7
|
+
id: "testFormForm",
|
|
8
|
+
guards: "isAuthorized",
|
|
9
|
+
elements: [
|
|
10
|
+
{
|
|
11
|
+
id: "testFormTab",
|
|
12
|
+
type: "tab",
|
|
13
|
+
tabs: [
|
|
14
|
+
{
|
|
15
|
+
title: "Dados principais",
|
|
16
|
+
id: "mainDataTab",
|
|
17
|
+
elements: [
|
|
18
|
+
{
|
|
19
|
+
label: "Nome",
|
|
20
|
+
name: "name",
|
|
21
|
+
type: "input",
|
|
22
|
+
dataType: EDataType.TEXT,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: "Coisa aleatória",
|
|
26
|
+
id: "randomThingFieldset",
|
|
27
|
+
type: "fieldset",
|
|
28
|
+
elements: [
|
|
29
|
+
{
|
|
30
|
+
label: "Qualquer coisa*",
|
|
31
|
+
name: "anything",
|
|
32
|
+
type: "select",
|
|
33
|
+
dataType: EDataType.TEXT,
|
|
34
|
+
isRequired: true,
|
|
35
|
+
options: [
|
|
36
|
+
{ label: "Rótulo para a opção 1", value: "optionOneLabel" },
|
|
37
|
+
{ label: "Rótulo para a opção 2", value: "optionTwoLabel" },
|
|
38
|
+
{ label: "Rótulo para a opção 3", value: "optionThreeLabel" },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "Outras coisas para escolher*",
|
|
43
|
+
name: "otherThingsToChoose",
|
|
44
|
+
type: "select",
|
|
45
|
+
dataType: EDataType.TEXT,
|
|
46
|
+
isRequired: true,
|
|
47
|
+
isMultiple: true,
|
|
48
|
+
options: [
|
|
49
|
+
{ label: "Rótulo para a opção 1", value: "optionOneLabel" },
|
|
50
|
+
{ label: "Rótulo para a opção 2", value: "optionTwoLabel" },
|
|
51
|
+
{ label: "Rótulo para a opção 3", value: "optionThreeLabel" },
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "Uma terceira coisa*",
|
|
56
|
+
name: "aThirdThingId",
|
|
57
|
+
type: "autocomplete",
|
|
58
|
+
dataType: EDataType.TEXT,
|
|
59
|
+
isRequired: true,
|
|
60
|
+
optionsApi: {
|
|
61
|
+
endpoint: "/endpoint-to-use",
|
|
62
|
+
// leave it blank so documenter will be forced to check it
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
label: "Hobbies",
|
|
69
|
+
name: "hobbiesId",
|
|
70
|
+
type: "autocomplete",
|
|
71
|
+
dataType: EDataType.TEXT,
|
|
72
|
+
isMultiple: true,
|
|
73
|
+
optionsApi: {
|
|
74
|
+
endpoint: "/endpoint-to-use",
|
|
75
|
+
// leave it blank so documenter will be forced to check it
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: "Dados secundários",
|
|
82
|
+
id: "secondaryDataTab",
|
|
83
|
+
elements: [
|
|
84
|
+
{
|
|
85
|
+
label: "Data de nascimento*",
|
|
86
|
+
name: "dateOfBirth",
|
|
87
|
+
type: "input",
|
|
88
|
+
dataType: EDataType.DATE,
|
|
89
|
+
isRequired: true,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: "Adicionar mais coisas",
|
|
93
|
+
name: "addMoreThingsArray",
|
|
94
|
+
type: "array",
|
|
95
|
+
elements: [
|
|
96
|
+
{
|
|
97
|
+
label: "Rótulo de input de arquivo",
|
|
98
|
+
name: "fileInputLabelUrl",
|
|
99
|
+
type: "file",
|
|
100
|
+
dataType: EDataType.TEXT,
|
|
101
|
+
storageConfig: {
|
|
102
|
+
fileNameStrategy: "uuid",
|
|
103
|
+
// leave it blank so documenter will be forced to check it
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: "Rótulo de input de senha",
|
|
108
|
+
name: "passwordInputLabel",
|
|
109
|
+
type: "input",
|
|
110
|
+
dataType: EDataType.PASSWORD,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: "Rótulo de input de número",
|
|
114
|
+
name: "numberInputLabel",
|
|
115
|
+
type: "input",
|
|
116
|
+
dataType: EDataType.NUMBER,
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EDataType } from "../../../enums/form.enum";
|
|
1
2
|
import type { IList } from "../../../interfaces/list.interface";
|
|
2
3
|
|
|
3
4
|
export const characterList: IList = {
|
|
@@ -11,8 +12,8 @@ export const characterList: IList = {
|
|
|
11
12
|
hasAuthentication: true,
|
|
12
13
|
},
|
|
13
14
|
properties: [
|
|
14
|
-
{ label: "Nome", property: "characterName", type: "title" },
|
|
15
|
-
{ label: "Descrição", property: "characterDescription", type: "description", isHtml: true, },
|
|
15
|
+
{ label: "Nome", property: "characterName", type: "title", dataType: EDataType.NVARCHAR },
|
|
16
|
+
{ label: "Descrição", property: "characterDescription", type: "description", isHtml: true, dataType: EDataType.LONGTEXT },
|
|
16
17
|
],
|
|
17
18
|
callsToActionMenu: [
|
|
18
19
|
{
|
|
@@ -43,5 +44,24 @@ export const characterList: IList = {
|
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
}
|
|
46
|
-
]
|
|
47
|
+
],
|
|
48
|
+
contracts: [
|
|
49
|
+
{
|
|
50
|
+
id: "characters",
|
|
51
|
+
endpoint: "/characters",
|
|
52
|
+
actions: ["get", "getById"],
|
|
53
|
+
request: {
|
|
54
|
+
entity: "characters",
|
|
55
|
+
description: "Represents a character in a story or narrative.",
|
|
56
|
+
fields: [
|
|
57
|
+
{ name: "id", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, isPrimaryKey: true },
|
|
58
|
+
{ name: "characterName", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
59
|
+
{ name: "characterImage", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
60
|
+
{ name: "characterDescription", dataType: EDataType.LONGTEXT, isRequired: false },
|
|
61
|
+
{ name: "characterType", dataType: EDataType.NVARCHAR, enum: ["protagonist", "antagonist", "hero", "villain", "sidekick", "supporting"], isRequired: false },
|
|
62
|
+
{ name: "characterGender", dataType: EDataType.NVARCHAR, enum: ["male", "female", "other"], isRequired: false },
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
],
|
|
47
67
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EDataType } from "../../../enums/form.enum";
|
|
1
2
|
import type { IList } from "../../../interfaces/list.interface";
|
|
2
3
|
|
|
3
4
|
export const movieList: IList = {
|
|
@@ -12,19 +13,19 @@ export const movieList: IList = {
|
|
|
12
13
|
},
|
|
13
14
|
properties: [
|
|
14
15
|
{
|
|
15
|
-
property: "pictureFile", type: "image", label: "Cartaz",
|
|
16
|
+
property: "pictureFile", type: "image", label: "Cartaz", dataType: EDataType.NVARCHAR,
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
|
-
property: "name", type: "title", label: "Nome",
|
|
19
|
+
property: "name", type: "title", label: "Nome", dataType: EDataType.NVARCHAR,
|
|
19
20
|
},
|
|
20
21
|
{
|
|
21
|
-
property: "releaseDate", type: "subtitle", label: "Data de lançamento",
|
|
22
|
+
property: "releaseDate", type: "subtitle", label: "Data de lançamento", dataType: EDataType.DATETIME2,
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
|
-
property: "movieGenres.name", type: "subtitle", label: "Gênero",
|
|
25
|
+
property: "movieGenres.name", type: "subtitle", label: "Gênero", dataType: EDataType.NVARCHAR,
|
|
25
26
|
},
|
|
26
27
|
{
|
|
27
|
-
property: "description", type: "description", label: "Descrição", isHtml: true,
|
|
28
|
+
property: "description", type: "description", label: "Descrição", isHtml: true, dataType: EDataType.LONGTEXT
|
|
28
29
|
},
|
|
29
30
|
],
|
|
30
31
|
callsToActionMenu: [
|
|
@@ -56,5 +57,32 @@ export const movieList: IList = {
|
|
|
56
57
|
}
|
|
57
58
|
},
|
|
58
59
|
}
|
|
59
|
-
]
|
|
60
|
+
],
|
|
61
|
+
contracts: [
|
|
62
|
+
{
|
|
63
|
+
id: "movies",
|
|
64
|
+
endpoint: "/movies",
|
|
65
|
+
actions: ["create", "update", "getById", "get", "delete"],
|
|
66
|
+
request: {
|
|
67
|
+
entity: "Movie",
|
|
68
|
+
description: "Represents a movie or TV series in the system.",
|
|
69
|
+
fields: [
|
|
70
|
+
{ name: "id", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, isPrimaryKey: true },
|
|
71
|
+
{ name: "pictureFile", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
72
|
+
{ name: "name", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
73
|
+
{ name: "description", dataType: EDataType.LONGTEXT, isRequired: true },
|
|
74
|
+
{ name: "releaseDate", dataType: EDataType.DATETIME2, isRequired: true },
|
|
75
|
+
{ name: "imdbRating", dataType: EDataType.FLOAT, isRequired: true },
|
|
76
|
+
{ name: "movieGenres", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, foreignKey: {
|
|
77
|
+
entity: "MovieGenre",
|
|
78
|
+
connectionAttribute: "_id",
|
|
79
|
+
relationship: "many-to-many"
|
|
80
|
+
} },
|
|
81
|
+
{ name: "link1", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
82
|
+
{ name: "link2", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
83
|
+
{ name: "link3", dataType: EDataType.NVARCHAR, isRequired: false },
|
|
84
|
+
],
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
],
|
|
60
88
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EDataType } from "../../../enums/form.enum";
|
|
1
2
|
import type { IList } from "../../../interfaces/list.interface";
|
|
2
3
|
|
|
3
4
|
export const movieEpisodeList: IList = {
|
|
@@ -12,10 +13,10 @@ export const movieEpisodeList: IList = {
|
|
|
12
13
|
},
|
|
13
14
|
properties: [
|
|
14
15
|
{
|
|
15
|
-
property: "episodeTitle", type: "title", label: "Título",
|
|
16
|
+
property: "episodeTitle", type: "title", label: "Título", dataType: EDataType.NVARCHAR,
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
|
-
property: "episodeDescription", type: "description", label: "Descrição",
|
|
19
|
+
property: "episodeDescription", type: "description", label: "Descrição", isHtml: true, dataType: EDataType.LONGTEXT,
|
|
19
20
|
},
|
|
20
21
|
],
|
|
21
22
|
callsToActionMenu: [
|
|
@@ -47,5 +48,32 @@ export const movieEpisodeList: IList = {
|
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
50
|
}
|
|
50
|
-
]
|
|
51
|
+
],
|
|
52
|
+
contracts: [
|
|
53
|
+
{
|
|
54
|
+
id: "moviesEpisodes",
|
|
55
|
+
endpoint: "/movies-episodes",
|
|
56
|
+
actions: ["create", "get", "getById", "update", "delete"],
|
|
57
|
+
request: {
|
|
58
|
+
entity: "MovieEpisode",
|
|
59
|
+
description: "Represents an episode of a TV series or show.",
|
|
60
|
+
fields: [
|
|
61
|
+
{ name: "_id", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, isPrimaryKey: true },
|
|
62
|
+
{ name: "movieId", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: true, foreignKey: {
|
|
63
|
+
entity: "Movie",
|
|
64
|
+
connectionAttribute: "_id",
|
|
65
|
+
relationship: "one-to-many"
|
|
66
|
+
} },
|
|
67
|
+
{ name: "title", dataType: EDataType.NVARCHAR, isRequired: true },
|
|
68
|
+
{ name: "description", dataType: EDataType.LONGTEXT, isRequired: true },
|
|
69
|
+
{ name: "releaseDate", dataType: EDataType.DATETIME2, isRequired: true },
|
|
70
|
+
{ name: "characters", dataType: EDataType.UNIQUEIDENTIFIER, isRequired: false, foreignKey: {
|
|
71
|
+
entity: "Character",
|
|
72
|
+
connectionAttribute: "_id",
|
|
73
|
+
relationship: "many-to-many"
|
|
74
|
+
} },
|
|
75
|
+
],
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
],
|
|
51
79
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EDataType } from "../../../enums/form.enum";
|
|
1
2
|
import type { IList } from "../../../interfaces/list.interface";
|
|
2
3
|
|
|
3
4
|
export const movieGenreList: IList = {
|
|
@@ -12,10 +13,10 @@ export const movieGenreList: IList = {
|
|
|
12
13
|
},
|
|
13
14
|
properties: [
|
|
14
15
|
{
|
|
15
|
-
property: "name", type: "title", label: "Nome",
|
|
16
|
+
property: "name", type: "title", label: "Nome", dataType: EDataType.NVARCHAR,
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
|
-
property: "description", type: "description", label: "Descrição",
|
|
19
|
+
property: "description", type: "description", label: "Descrição", isHtml: true, dataType: EDataType.LONGTEXT,
|
|
19
20
|
},
|
|
20
21
|
],
|
|
21
22
|
callsToActionMenu: [
|
|
@@ -47,5 +48,30 @@ export const movieGenreList: IList = {
|
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
50
|
}
|
|
50
|
-
]
|
|
51
|
+
],
|
|
52
|
+
contracts: [
|
|
53
|
+
{
|
|
54
|
+
id: "moviesGenres",
|
|
55
|
+
endpoint: "/movie-genres",
|
|
56
|
+
actions: ["create", "get", "getById", "update", "delete"],
|
|
57
|
+
request : {
|
|
58
|
+
entity: "moviesGenres",
|
|
59
|
+
description: "",
|
|
60
|
+
fields: [
|
|
61
|
+
{
|
|
62
|
+
name: "name",
|
|
63
|
+
dataType: EDataType.TEXT,
|
|
64
|
+
isRequired: true,
|
|
65
|
+
maxSize: 255,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "description",
|
|
69
|
+
dataType: EDataType.TEXT,
|
|
70
|
+
isRequired: true,
|
|
71
|
+
maxSize: 255,
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
],
|
|
51
77
|
};
|
|
@@ -8,7 +8,7 @@ import { movieGenreList } from "../components/lists/movieGenre.list";
|
|
|
8
8
|
|
|
9
9
|
export const movieModule: IModule = {
|
|
10
10
|
id: "movieModule",
|
|
11
|
-
title: "
|
|
11
|
+
title: "Filme",
|
|
12
12
|
icon: "movie",
|
|
13
13
|
components: [
|
|
14
14
|
movieForm,
|
|
@@ -18,5 +18,4 @@ export const movieModule: IModule = {
|
|
|
18
18
|
movieEpisodeForm,
|
|
19
19
|
movieEpisodeList
|
|
20
20
|
]
|
|
21
|
-
}
|
|
22
|
-
|
|
21
|
+
}
|
|
@@ -9,7 +9,7 @@ export const movieBackoffice: IProject = {
|
|
|
9
9
|
id: "movieBackoffice",
|
|
10
10
|
title: "Movie Backoffice",
|
|
11
11
|
description: "Sistema de gerenciamento para filmes e personagens.",
|
|
12
|
-
flow: "
|
|
12
|
+
flow: "backofficeOpenedWithoutPermissions",
|
|
13
13
|
businessPlan: {
|
|
14
14
|
businessValue: "Gerenciar e otimizar as operações do Movie.",
|
|
15
15
|
targetMarket: "Empresas que utilizam o Movie para gerenciar sugestões e feedbacks.",
|
|
@@ -20,7 +20,7 @@ export const movieBackoffice: IProject = {
|
|
|
20
20
|
monetization: "Assinaturas mensais para acesso ao sistema.",
|
|
21
21
|
},
|
|
22
22
|
frontend: {
|
|
23
|
-
framework: "
|
|
23
|
+
framework: "react",
|
|
24
24
|
uiKit: "flowbite",
|
|
25
25
|
},
|
|
26
26
|
backend: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { IBusinessRule } from "./project.interface";
|
|
2
|
+
|
|
3
|
+
export interface IFlowChart {
|
|
4
|
+
actors: IActor[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface IActor {
|
|
8
|
+
name: string;
|
|
9
|
+
actionsWithElements: IActionWithElement[];
|
|
10
|
+
businessRules?: IBusinessRule[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IActionWithElement {
|
|
14
|
+
verb: "create" | "get" | "getById" | "update" | "delete" | "clone" | "sendEmail";
|
|
15
|
+
elements?: IFlowChartElement[];
|
|
16
|
+
businessRules?: IBusinessRule[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IFlowChartElement {
|
|
20
|
+
name: string;
|
|
21
|
+
businessRules?: IBusinessRule[];
|
|
22
|
+
}
|
|
@@ -11,6 +11,7 @@ import type { IFormInput } from "./form-input.interface";
|
|
|
11
11
|
import type { IFormSelect } from "./form-select.interface";
|
|
12
12
|
import type { IFormTab } from "./form-tab.interface";
|
|
13
13
|
import type { IBusinessRule } from "./project.interface";
|
|
14
|
+
import type { IActor, IFlowChart } from "./form-flowchart.interface";
|
|
14
15
|
|
|
15
16
|
export interface IForm {
|
|
16
17
|
componentType: "form";
|
|
@@ -30,6 +31,11 @@ export interface IForm {
|
|
|
30
31
|
businessRules?: IBusinessRule[];
|
|
31
32
|
userStory?: string;
|
|
32
33
|
}[];
|
|
34
|
+
flowChart?: IFlowChart;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface IContract {
|
|
38
|
+
id: string;
|
|
33
39
|
kanban?: {
|
|
34
40
|
status: "toDo" | "inProgress" | "done";
|
|
35
41
|
assigneesIds?: string[];
|