我正在尝试创建一个包含对象的模型,有人建议我采用正确的方法吗?
这是我现有的模型:
export interface ModelGetFile {
Id: number;
Name: string;
Description: string;
SubjectId: number;
SubjectTypeId: number;
SubjectLevelId: number;
SubjectOptionId: number;
LanguageId: number;
FileUploadId: number;
FileUpload: {
"Id": 21;
"FileName": "Capture_20190330122500.JPG";
"FileDescription": "Upload"
}
}
我尝试过:
export interface ModelGetFile {
Id: number;
Name: string;
Description: string;
SubjectId: number;
SubjectTypeId: number;
SubjectLevelId: number;
SubjectOptionId: number;
LanguageId: number;
FileUploadId: number;
FileUpload:object
}
但是不确定将所有属性保留在FileUpload
下的正确方法-任何人都可以帮助我
谢谢。