一、保存工作空间

二、文件->新建模型

三、新建数据库表


四、修改数据库表名称

五、设置数据库表字段


六、工具->Generate Object-Oriented Model
打开详情页签,去掉“检查模型”和名称转换为编码

打开常规,选择你想要生成的语言,应用并确认


七、语言->Edit Current Object Language->Profile->Attribute->Templates->definition
按自己的需求重写代码生成模板应用确认即可,比如我的C#模板:
.if (%isValidAttribute%) ///<summary> /// [%Name%] ///</summary> .if (%comment%) /// <remarks> [%comment%] /// </remarks> .endif .if (%Multiple% == false) and (%isIndexer% == false) [%visibility% ][%flags% ]%dataType% %code%[ = %InitialValue%] { get; set; } .else [%visibility% ][%flags% ]%dataType%[%arraySize%] %code%[ = %InitialValue%] { get; set; } .endif .endif

八、语言->Generate C# Code->Generated Files
选择你需要代码的生成的模型


九、数据库->Change Current DBMS
选择你要生成的Sql格式

十、数据库->生成数据库
确认生成即可
