|
@@ -1,17 +1,46 @@
|
|
import { DataModel } from '@imengyu/js-request-transform';
|
|
import { DataModel } from '@imengyu/js-request-transform';
|
|
import { AppServerRequestModule } from '../RequestModules';
|
|
import { AppServerRequestModule } from '../RequestModules';
|
|
|
|
|
|
-export class IchInfo extends DataModel<IchInfo> {
|
|
|
|
- constructor() {
|
|
|
|
- super(IchInfo, "非遗项目信息");
|
|
|
|
|
|
+export class CommonInfo<T extends DataModel> extends DataModel<T> {
|
|
|
|
+
|
|
|
|
+ constructor(classCreator?: (new () => T) | undefined, name: string = '基础信息') {
|
|
|
|
+ super(classCreator, name);
|
|
this.setNameMapperCase('Camel', 'Snake');
|
|
this.setNameMapperCase('Camel', 'Snake');
|
|
this._convertTable = {
|
|
this._convertTable = {
|
|
id: { clientSide: 'number', serverSide: 'number', clientSideRequired: true },
|
|
id: { clientSide: 'number', serverSide: 'number', clientSideRequired: true },
|
|
- lonlat: { serverSide: 'undefined' },
|
|
|
|
flag: { clientSide: 'splitCommaArray', serverSide: 'commaArrayMerge' },
|
|
flag: { clientSide: 'splitCommaArray', serverSide: 'commaArrayMerge' },
|
|
- batch: { clientSide: 'number', serverSide: 'string' },
|
|
|
|
type: { clientSide: 'number', serverSide: 'number' },
|
|
type: { clientSide: 'number', serverSide: 'number' },
|
|
keywords: { clientSide: 'splitCommaArray', serverSide: 'commaArrayMerge' },
|
|
keywords: { clientSide: 'splitCommaArray', serverSide: 'commaArrayMerge' },
|
|
|
|
+ images: { clientSide: 'array', serverSide: 'string' },
|
|
|
|
+ expandInfo: { serverSide: 'undefined' },
|
|
|
|
+ };
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ contentId = null as number|null;
|
|
|
|
+ collectId = null as number|null;
|
|
|
|
+
|
|
|
|
+ title = '' as string;
|
|
|
|
+ region = null as number|null;
|
|
|
|
+ image = '' as string|null;
|
|
|
|
+ imageDesc = '' as string|null;
|
|
|
|
+ images = [] as string[];
|
|
|
|
+ audio = '' as string|null;
|
|
|
|
+ video = '' as string|null;
|
|
|
|
+ flag = '' as string;
|
|
|
|
+ keywords = '' as string|null;
|
|
|
|
+ tags = '' as string;
|
|
|
|
+ associationId = 0 as number;
|
|
|
|
+ pid = 0 as number;
|
|
|
|
+ content = '' as string|null;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class IchInfo extends CommonInfo<IchInfo> {
|
|
|
|
+ constructor() {
|
|
|
|
+ super(IchInfo, "非遗项目信息");
|
|
|
|
+ this._convertTable = {
|
|
|
|
+ ...this._convertTable,
|
|
|
|
+ lonlat: { serverSide: 'undefined' },
|
|
|
|
+ batch: { clientSide: 'number', serverSide: 'string' },
|
|
typicalImages: [
|
|
typicalImages: [
|
|
{
|
|
{
|
|
clientSide: 'object',
|
|
clientSide: 'object',
|
|
@@ -27,7 +56,6 @@ export class IchInfo extends DataModel<IchInfo> {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- expandInfo: { serverSide: 'undefined' },
|
|
|
|
};
|
|
};
|
|
this._convertKeyType = (key, direction) => {
|
|
this._convertKeyType = (key, direction) => {
|
|
if (key.endsWith('Text') || key.endsWith('_text')) {
|
|
if (key.endsWith('Text') || key.endsWith('_text')) {
|
|
@@ -61,20 +89,6 @@ export class IchInfo extends DataModel<IchInfo> {
|
|
id = 0 as number;
|
|
id = 0 as number;
|
|
modelId = 2;
|
|
modelId = 2;
|
|
mainBodyColumnId = 0 as number;
|
|
mainBodyColumnId = 0 as number;
|
|
- contentId = null as number|null;
|
|
|
|
- collectId = null as number|null;
|
|
|
|
- title = '' as string;
|
|
|
|
- region = null as number|null;
|
|
|
|
- image = '' as string;
|
|
|
|
- imageDesc = '' as string|null;
|
|
|
|
- images = [] as string[];
|
|
|
|
- audio = '' as string|null;
|
|
|
|
- video = '' as string;
|
|
|
|
- flag = '' as string;
|
|
|
|
- keywords = '' as string|null;
|
|
|
|
- tags = '' as string;
|
|
|
|
- associationId = '' as string|null;
|
|
|
|
- pid = 0 as number;
|
|
|
|
ztImage = '' as string|null;
|
|
ztImage = '' as string|null;
|
|
intro = '' as string;
|
|
intro = '' as string;
|
|
description = '' as string;
|
|
description = '' as string;
|
|
@@ -173,29 +187,19 @@ export class IchExpandInfo extends DataModel<IchExpandInfo> {
|
|
protectLevelText = '' as string;
|
|
protectLevelText = '' as string;
|
|
progressText = '' as string;
|
|
progressText = '' as string;
|
|
}
|
|
}
|
|
-export class InheritorInfo extends DataModel<InheritorInfo> {
|
|
|
|
|
|
+export class InheritorInfo extends CommonInfo<InheritorInfo> {
|
|
constructor() {
|
|
constructor() {
|
|
super(InheritorInfo, "传承人信息");
|
|
super(InheritorInfo, "传承人信息");
|
|
- this.setNameMapperCase('Camel', 'Snake');
|
|
|
|
this._convertTable = {
|
|
this._convertTable = {
|
|
- id: { clientSide: 'number', serverSide: 'number', clientSideRequired: true },
|
|
|
|
|
|
+ ...this._convertTable,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ expandInfo = new InheritorExpandInfo();
|
|
|
|
+
|
|
id = 0 as number;
|
|
id = 0 as number;
|
|
modelId = 7;
|
|
modelId = 7;
|
|
mainBodyColumnId = 0 as number;
|
|
mainBodyColumnId = 0 as number;
|
|
- title = '' as string;
|
|
|
|
- region = null as number|null;
|
|
|
|
- image = '' as string;
|
|
|
|
- imageDesc = '' as string|null;
|
|
|
|
- images = [] as string[];
|
|
|
|
- audio = '' as string|null;
|
|
|
|
- video = '' as string|null;
|
|
|
|
- flag = '' as string;
|
|
|
|
- keywords = '' as string|null;
|
|
|
|
- tags = '' as string;
|
|
|
|
- associationId = null as number|null;
|
|
|
|
- pid = 0 as number;
|
|
|
|
alsoName = '' as string|null;
|
|
alsoName = '' as string|null;
|
|
nation = '' as string;
|
|
nation = '' as string;
|
|
dateBirth = '' as string;
|
|
dateBirth = '' as string;
|
|
@@ -247,29 +251,20 @@ export class InheritorExpandInfo extends DataModel<InheritorExpandInfo> {
|
|
}
|
|
}
|
|
modelId = 7;
|
|
modelId = 7;
|
|
}
|
|
}
|
|
-export class SeminarInfo extends DataModel<SeminarInfo> {
|
|
|
|
|
|
+export class SeminarInfo extends CommonInfo<SeminarInfo> {
|
|
constructor() {
|
|
constructor() {
|
|
super(SeminarInfo, "传习所信息");
|
|
super(SeminarInfo, "传习所信息");
|
|
this.setNameMapperCase('Camel', 'Snake');
|
|
this.setNameMapperCase('Camel', 'Snake');
|
|
this._convertTable = {
|
|
this._convertTable = {
|
|
- id: { clientSide: 'number', serverSide: 'number', clientSideRequired: true },
|
|
|
|
|
|
+ ...this._convertTable,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ expandInfo = new SeminarExpandInfo();
|
|
|
|
+
|
|
id = 0 as number;
|
|
id = 0 as number;
|
|
modelId = 17;
|
|
modelId = 17;
|
|
mainBodyColumnId = 0 as number;
|
|
mainBodyColumnId = 0 as number;
|
|
- title = '' as string;
|
|
|
|
- region = null as number|null;
|
|
|
|
- image = '' as string|null;
|
|
|
|
- imageDesc = '' as string|null;
|
|
|
|
- images = [] as string[];
|
|
|
|
- audio = '' as string|null;
|
|
|
|
- video = '' as string|null;
|
|
|
|
- flag = '' as string;
|
|
|
|
- keywords = '' as string|null;
|
|
|
|
- tags = '' as string;
|
|
|
|
- associationId = 0 as number;
|
|
|
|
- pid = 0 as number;
|
|
|
|
content = '' as string|null;
|
|
content = '' as string|null;
|
|
mapX = '' as string|null;
|
|
mapX = '' as string|null;
|
|
mapY = '' as string|null;
|
|
mapY = '' as string|null;
|