export-table-pulgin-csharp 1.0.21 → 1.0.22
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -0
- package/package.json +1 -1
- package/src/index.ts +26 -0
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAA0B,MAAM,kBAAkB,CAAA;AAG1H,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAA0B,MAAM,kBAAkB,CAAA;AAG1H,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAiQpE;AAED,qBAAa,YAAa,SAAQ,UAAU;IAC3C,IAAI,SAAW;IACf,IAAI,EAAE,MAAM,EAAE,CAAS;IAEvB,WAAW,CAAC,KAAK,EAAE,iBAAiB;CAOpC;AAED,eAAO,MAAM,aAAa,gBAEzB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -194,6 +194,32 @@ ${(0, export_table_lib_1.foreach)(fields, f => {
|
|
|
194
194
|
})}
|
|
195
195
|
#endregion
|
|
196
196
|
|
|
197
|
+
#region uid map
|
|
198
|
+
${(0, export_table_lib_1.foreach)(fields, f => {
|
|
199
|
+
if (f.nameOrigin != f.name) {
|
|
200
|
+
return `
|
|
201
|
+
protected static Dictionary<int, ${RowClass}> _tempDictBy${convMemberName(f.name)};
|
|
202
|
+
public static ${RowClass} GetConfigBy${convMemberName(f.name)}(int ${convMemberName(f.name)})
|
|
203
|
+
{
|
|
204
|
+
if (_tempDictBy${convMemberName(f.name)} == null)
|
|
205
|
+
{
|
|
206
|
+
_tempDictBy${convMemberName(f.name)} = new Dictionary<int, ${RowClass}>();
|
|
207
|
+
Configs.ForEach(c =>
|
|
208
|
+
{
|
|
209
|
+
_tempDictBy${convMemberName(f.name)}.Add(c.${convMemberName(f.name)}, c);
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return _tempDictBy${convMemberName(f.name)}.GetValueOrDefault(${convMemberName(f.name)});
|
|
213
|
+
}
|
|
214
|
+
`;
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
return "";
|
|
218
|
+
}
|
|
219
|
+
})}
|
|
220
|
+
|
|
221
|
+
#endregion uid map
|
|
222
|
+
|
|
197
223
|
#region 生成fk.get/set
|
|
198
224
|
${(0, export_table_lib_1.foreach)(fields, f => `
|
|
199
225
|
${(0, export_table_lib_1.iff)(f.type == "fk", () => `
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -172,6 +172,32 @@ ${foreach(fields, f => {
|
|
|
172
172
|
)}
|
|
173
173
|
#endregion
|
|
174
174
|
|
|
175
|
+
#region uid map
|
|
176
|
+
${foreach(fields, f => {
|
|
177
|
+
if (f.nameOrigin != f.name) {
|
|
178
|
+
return `
|
|
179
|
+
protected static Dictionary<int, ${RowClass}> _tempDictBy${convMemberName(f.name)};
|
|
180
|
+
public static ${RowClass} GetConfigBy${convMemberName(f.name)}(int ${convMemberName(f.name)})
|
|
181
|
+
{
|
|
182
|
+
if (_tempDictBy${convMemberName(f.name)} == null)
|
|
183
|
+
{
|
|
184
|
+
_tempDictBy${convMemberName(f.name)} = new Dictionary<int, ${RowClass}>();
|
|
185
|
+
Configs.ForEach(c =>
|
|
186
|
+
{
|
|
187
|
+
_tempDictBy${convMemberName(f.name)}.Add(c.${convMemberName(f.name)}, c);
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
return _tempDictBy${convMemberName(f.name)}.GetValueOrDefault(${convMemberName(f.name)});
|
|
191
|
+
}
|
|
192
|
+
`
|
|
193
|
+
} else {
|
|
194
|
+
return ""
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
)}
|
|
198
|
+
|
|
199
|
+
#endregion uid map
|
|
200
|
+
|
|
175
201
|
#region 生成fk.get/set
|
|
176
202
|
${foreach(fields, f => `
|
|
177
203
|
${iff(f.type == "fk", () => `
|