namespace PatreonSync\Core\Content\PatreonLink; use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition; use Shopware\Core\Framework\DataAbstractionLayer\Field\{IdField, ForeignKeyField, StringField, DateTimeField, BoolField}; use Shopware\Core\Framework\DataAbstractionLayer\FieldCollection; class PatreonLinkDefinition extends EntityDefinition { public function getEntityName(): string { return 'patreon_link'; } public function getCollectionClass(): string { return PatreonLinkCollection::class; } public function getEntityClass(): string { return PatreonLinkEntity::class; } protected function defineFields(): FieldCollection { return new FieldCollection([ new IdField('id', 'id'), new StringField('name', 'name'), new StringField('description', 'description'), new BoolField('active', 'active'), new ForeignKeyField('customer_id', 'customerId', 'customer', 'id'), new StringField('patreon_user_id', 'patreonUserId'), new StringField('access_token', 'accessToken'), new StringField('refresh_token', 'refreshToken'), new StringField('current_tier', 'currentTier'), new DateTimeField('last_synced_at', 'lastSyncedAt'), ]); } }