diff --git a/Note.java b/Note.java new file mode 100644 index 0000000..1da4dff --- /dev/null +++ b/Note.java @@ -0,0 +1,45 @@ +package cn.lblbc.notepad.db; + +import ohos.data.orm.OrmObject; +import ohos.data.orm.annotation.Entity; +import ohos.data.orm.annotation.PrimaryKey; +/** + * 厦门大学计算机专业 | 前华为工程师 + * 专注《零基础学编程系列》 http://lblbc.cn/blog + * 包含:Java | 安卓 | 前端 | Flutter | iOS | 小程序 | 鸿蒙 + * 公众号:蓝不蓝编程 + */ +@Entity(tableName = "Note") +public class Note extends OrmObject { + @PrimaryKey(autoGenerate = true) + private long id; + private String content; + + public Note() { + } + + public Note(String content) { + this.content = content; + } + + public Note(long id, String content) { + this.id = id; + this.content = content; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } +}