123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- import 'package:vital_local_database/index.dart';
- import 'syncable.dart';
- /// 健康体检批次记录
- class ExamBatchEntity extends SyncableEntity<ExamBatchEntity> {
- static const String _tableName = "examBatchs";
- static final _columns = ExamBatchColumnsDefine();
- // ignore: constant_identifier_names
- static const TABLE_CREATE_SQL = 'CREATE TABLE IF NOT EXISTS "$_tableName" ('
- '"id" INTEGER NOT NULL,'
- '"code" VARCHAR(100) NOT NULL,'
- '"userCode" VARCHAR(100) NOT NULL,'
- '"patientCode" VARCHAR(100) NOT NULL,'
- '"batchNumber" VARCHAR(100) NOT NULL,'
- '"syncType" INTEGER NOT NULL,'
- '"syncState" INTEGER NOT NULL,'
- '"createTime" DATETIME NOT NULL,'
- '"updateTime" DATETIME NULL,'
- '"isValid" INTEGER NOT NULL,'
- 'PRIMARY KEY ("id")'
- ');';
- @override
- IDbColumnsDefine<IDbEntity> get columns => _columns;
- @override
- String get tableName => _tableName;
- /// 居民档案编码
- String patientCode = '';
- /// 批次号
- String batchNumber = '';
- }
- class ExamBatchColumnsDefine extends SyncableColumnsDefine<ExamBatchEntity>
- implements IDbColumnsDefine<ExamBatchEntity> {
- /// 居民档案编码
- final patientCode = DbColumn<String>("patientCode");
- /// 批次号
- final batchNumber = DbColumn<String>("batchNumber");
- }
|