OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library gcloud.db.meta_model; |
| 6 |
| 7 import '../db.dart' as db; |
| 8 |
| 9 @db.Kind(name: '__namespace__') |
| 10 class Namespace extends db.ExpandoModel { |
| 11 static const int EmptyNamespaceId = 1; |
| 12 |
| 13 String get name { |
| 14 // The default namespace will be reported with id 1. |
| 15 if (id == Namespace.EmptyNamespaceId) return null; |
| 16 return id; |
| 17 } |
| 18 } |
| 19 |
| 20 @db.Kind(name: '__kind__') |
| 21 class Kind extends db.Model { |
| 22 String get name => id; |
| 23 } |
OLD | NEW |