py-uni
Version:
py-uni
60 lines (57 loc) • 2.5 kB
text/typescript
import { FeedbackDatas } from './feedbackDatas.domain';
export class Content {
public Id: string; // 内容标识
public Title: string; // 名称
public Sn: string; // 内容编号
public ContentTypeId: string; // 所属内容类型id
public Type: number; // 类型(文章、QA、公告...)
public Content: string; // 内容
public ReleaseMan: string; // 所属用户
public CreateTime: string | undefined; // 上传时间
public tags: string; // 关键词(标签)
public UpdateTime: string | undefined; // 更新时间
public State: number; // 状态(待审核、已审核...``)
public Reason: string; // 审核理由
public EndTime: string | undefined; // 公示期结束时间
public FeedbackDatas: FeedbackDatas; // 收集反馈数据集合
public AccessoryIds: string; // 附件
public Unit: string; // 发布单位
public DelFlag: number; // 删除标识
constructor(options: {
Id?: string;
Title?: string;
Sn?: string;
ContentTypeId?: string;
Type?: number;
Content?: string;
ReleaseMan?: string;
CreateTime?: string;
tags?: string;
UpdateTime?: string;
State?: number;
Reason?: string;
EndTime?: string;
FeedbackDatas?: FeedbackDatas;
AccessoryIds?: string;
Unit?: string;
DelFlag?: number;
} = {}) {
this.Id = options.Id || '';
this.Title = options.Title || '';
this.Sn = options.Sn || '';
this.ContentTypeId = options.ContentTypeId || '';
this.Type = !options.Type ? 0 : Number.parseFloat(options.Type.toString());
this.Content = options.Content || '';
this.ReleaseMan = options.ReleaseMan || '';
this.CreateTime = options.CreateTime || new Date().toString();
this.tags = options.tags || '';
this.UpdateTime = options.CreateTime || new Date().toString();
this.State = !options.State ? 0 : Number.parseFloat(options.State.toString());
this.Reason = options.Reason || '';
this.EndTime = options.CreateTime || new Date().toString();
this.FeedbackDatas = new FeedbackDatas(options.FeedbackDatas);
this.AccessoryIds = options.AccessoryIds || '';
this.Unit = options.Unit || '';
this.DelFlag = !options.DelFlag ? 0 : Number.parseFloat(options.DelFlag.toString());
}
}