Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign: Restaurant Page #1443

Open
wants to merge 6 commits into
base: ui/redesign
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class RestaurantFetcher {
}
return Restaurant(
establishment.id,
establishment.type.namePt,
establishment.type.nameEn,
establishment.namePt,
establishment.nameEn,
period,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ class RestaurantDatabase extends AppDatabase<List<Restaurant>> {
CREATE TABLE RESTAURANTS(
id INTEGER PRIMARY KEY,
ref TEXT,
namePt TEXT
namePt TEXT)
typePt TEXT,
typeEn TEXT,
namePt TEXT,
nameEn TEXT)
''',
'''
CREATE TABLE MEALS(
Expand Down Expand Up @@ -47,6 +49,8 @@ class RestaurantDatabase extends AppDatabase<List<Restaurant>> {

return Restaurant(
restaurantId,
map['typePt'] as String,
map['typeEn'] as String,
map['namePt'] as String,
map['nameEn'] as String,
map['period'] as String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ List<Restaurant> getRestaurantsFromHtml(Response response) {
}
}
return Restaurant(
null,
null,
null,
restaurantTuple.$2,
restaurantTuple.$2,
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions packages/uni_app/lib/model/entities/restaurant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ part '../../generated/model/entities/restaurant.g.dart';
class Restaurant {
Restaurant(
this.id,
this.typePt,
this.typeEn,
this.namePt,
this.nameEn,
this.period,
Expand All @@ -26,6 +28,10 @@ class Restaurant {
_$RestaurantFromJson(json);
@JsonKey(name: 'id')
final int? id;
@JsonKey(name: 'typePt')
final String? typePt;
@JsonKey(name: 'typeEn')
final String? typeEn;
@JsonKey(name: 'namePt')
final String namePt;
@JsonKey(name: 'nameEn')
Expand Down
Loading
Loading