Commit 9c70202d authored by Administrator's avatar Administrator

tag and tagGroup models

parent eca77bf4
......@@ -304,6 +304,40 @@ const tableHeartRateZone = SqfEntityTable(
],
);
const tableTagGroup = SqfEntityTable(
tableName: 'tagGroups',
primaryKeyName: 'id',
primaryKeyType: PrimaryKeyType.integer_auto_incremental,
useSoftDeleting: false,
modelName: 'DbTagGroup',
fields: [
SqfEntityField('name', DbType.text),
SqfEntityField('color', DbType.integer),
SqfEntityField('system', DbType.bool),
SqfEntityFieldRelationship(
parentTable: tableAthlete,
deleteRule: DeleteRule.CASCADE,
defaultValue: 0),
],
);
const tableTag = SqfEntityTable(
tableName: 'tags',
primaryKeyName: 'id',
primaryKeyType: PrimaryKeyType.integer_auto_incremental,
useSoftDeleting: false,
modelName: 'DbTag',
fields: [
SqfEntityField('name', DbType.text),
SqfEntityField('color', DbType.integer),
SqfEntityField('system', DbType.bool),
SqfEntityFieldRelationship(
parentTable: tableTagGroup,
deleteRule: DeleteRule.CASCADE,
defaultValue: 0),
],
);
@SqfEntityBuilder(encrateia)
const encrateia = SqfEntityModel(
modelName: 'DbEncrateia', // optional
......@@ -318,6 +352,8 @@ const encrateia = SqfEntityModel(
tableHeartRateZone,
tablePowerZoneSchema,
tablePowerZone,
tableTag,
tableTagGroup,
],
sequences: [],
bundledDatabasePath: null,
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment