1
1
from django .db import models
2
2
3
- from clickhouse_backend .models import ClickhouseModel
4
3
5
-
6
- class Author (ClickhouseModel ):
4
+ class Author (models .Model ):
7
5
name = models .CharField (max_length = 100 )
8
6
age = models .IntegerField ()
9
7
friends = models .ManyToManyField ("self" , blank = True )
10
8
11
9
12
- class Publisher (ClickhouseModel ):
10
+ class Publisher (models . Model ):
13
11
name = models .CharField (max_length = 255 )
14
12
num_awards = models .IntegerField ()
15
13
16
14
17
- class Book (ClickhouseModel ):
15
+ class Book (models . Model ):
18
16
isbn = models .CharField (max_length = 9 )
19
17
name = models .CharField (max_length = 255 )
20
18
pages = models .IntegerField ()
@@ -26,7 +24,7 @@ class Book(ClickhouseModel):
26
24
pubdate = models .DateField ()
27
25
28
26
29
- class Store (ClickhouseModel ):
27
+ class Store (models . Model ):
30
28
name = models .CharField (max_length = 255 )
31
29
books = models .ManyToManyField (Book )
32
30
original_opening = models .DateTimeField ()
@@ -37,7 +35,7 @@ class DepartmentStore(Store):
37
35
chain = models .CharField (max_length = 255 )
38
36
39
37
40
- class Employee (ClickhouseModel ):
38
+ class Employee (models . Model ):
41
39
# The order of these fields matter, do not change. Certain backends
42
40
# rely on field ordering to perform database conversions, and this
43
41
# model helps to test that.
@@ -49,12 +47,12 @@ class Employee(ClickhouseModel):
49
47
salary = models .DecimalField (max_digits = 8 , decimal_places = 2 )
50
48
51
49
52
- class Company (ClickhouseModel ):
50
+ class Company (models . Model ):
53
51
name = models .CharField (max_length = 200 )
54
52
motto = models .CharField (max_length = 200 , null = True , blank = True )
55
53
ticker_name = models .CharField (max_length = 10 , null = True , blank = True )
56
54
description = models .CharField (max_length = 200 , null = True , blank = True )
57
55
58
56
59
- class Ticket (ClickhouseModel ):
57
+ class Ticket (models . Model ):
60
58
active_at = models .DateTimeField ()
0 commit comments