sqflite 数据库实体
sqlite 模型注释和代码生成器
动机
https://dbdiagram.io/d/6341f49df0018a1c5fc24f90
Table "images" {
"id" INTEGER [pk]
"created_at" INTEGER [not null]
"uploaded_at" INTEGER
"file_size_bytes" INTEGER
"is_file_uploaded" INTEGER [not null]
"width" INTEGER [not null]
"height" INTEGER [not null]
"is_deleted" INTEGER [not null]
}
Table "profile" {
"first_name" TEXT [not null]
"last_name" TEXT [not null]
"position" TEXT
"profile" TEXT
"team_name" TEXT
"id" INTEGER [pk, increment]
"created" INTEGER [not null, default: `now()`]
}
生成 sqlite 模型和适配器
运行以下命令
fvm flutter packages pub run build_runner build –delete-conflicting-outputs
