|
@@ -1,66 +1,66 @@
|
|
|
-from tortoise import fields
|
|
|
-from tortoise.models import Model
|
|
|
-from pydantic import BaseModel
|
|
|
-from datetime import datetime
|
|
|
-class User(Model):
|
|
|
- id = fields.IntField(pk=True)
|
|
|
- username = fields.CharField(max_length=30, unique=True, description="帳號")
|
|
|
- password = fields.CharField(max_length=128, description="密碼")
|
|
|
- email = fields.CharField(max_length=128, description="信箱")
|
|
|
- points = fields.IntField(description="點數")
|
|
|
-
|
|
|
-#學校
|
|
|
-class Schools(Model):
|
|
|
- id = fields.IntField(pk=True)
|
|
|
- name = fields.CharField(max_length=45, description="學校名稱")
|
|
|
- longitude = fields.CharField(max_length=100, description="經度")
|
|
|
- latitude = fields.CharField(max_length=100, description="緯度")
|
|
|
- group_id = fields.IntField(description="學群")
|
|
|
- address = fields.CharField(max_length=128,description="地址")
|
|
|
-
|
|
|
-class School_group(Model):
|
|
|
- id = fields.IntField(pk=True)
|
|
|
- group_name = fields.CharField(max_length=45, description="學群名稱")
|
|
|
-
|
|
|
-class Class_name(Model):
|
|
|
- id = fields.IntField(pk=True)
|
|
|
- name = fields.CharField(max_length=45, description="課程名稱")
|
|
|
- school_id = fields.IntField(description="學校ID")
|
|
|
- category = fields.CharField(max_length=45, description="分類")
|
|
|
- introduction = fields.TextField(description="簡介")
|
|
|
- organizer = fields.CharField(max_length=45, description="主辦單位")
|
|
|
- cover_img = fields.CharField(max_length=255, description="封面圖片")
|
|
|
-
|
|
|
-
|
|
|
-class Class_list(Model):
|
|
|
- id = fields.IntField(pk=True)
|
|
|
- name_id = fields.IntField(description="課程名稱ID")
|
|
|
- event = fields.CharField(max_length=45, description="場次")
|
|
|
- start_time = fields.DatetimeField(description="開始時間")
|
|
|
- end_time = fields.DatetimeField(description="結束時間")
|
|
|
- contact = fields.CharField(max_length=255, description="聯絡方式")
|
|
|
- lecturer = fields.CharField(max_length=255, description="講師")
|
|
|
- location = fields.CharField(max_length=255, description="地點詳情")
|
|
|
- content = fields.TextField(description="內容")
|
|
|
- URL = fields.TextField(description="連結網址")
|
|
|
- people = fields.CharField(max_length=255, description="對象")
|
|
|
- fee_method = fields.CharField(max_length=255, description="收費方式")
|
|
|
- registration_way = fields.CharField(max_length=255, description="報名方式")
|
|
|
- remark = fields.TextField(description="備註")
|
|
|
-
|
|
|
-
|
|
|
-class Class_detail(Model):
|
|
|
- id = fields.IntField(pk=True)
|
|
|
- class_list_id = fields.IntField(description="課程ID")
|
|
|
- start_time = fields.DatetimeField(description="開始時間")
|
|
|
- end_time = fields.DatetimeField(description="結束時間")
|
|
|
- sessions = fields.IntField(description="堂數")
|
|
|
- content = fields.TextField(description="內容")
|
|
|
-
|
|
|
-class Registration(Model):
|
|
|
- id = fields.IntField(pk=True)
|
|
|
- class_id = fields.IntField(description="課程ID")
|
|
|
- user_id = fields.IntField(description="使用者ID")
|
|
|
- reg_confirm = fields.CharField(max_length=255, description="報名確認(1:報名成功 0:單純報名)")
|
|
|
- is_del = fields.CharField(max_length=255, description="是否取消(1:yes ,0:no)")
|
|
|
+from tortoise import fields
|
|
|
+from tortoise.models import Model
|
|
|
+from pydantic import BaseModel
|
|
|
+from datetime import datetime
|
|
|
+class User(Model):
|
|
|
+ id = fields.IntField(pk=True)
|
|
|
+ username = fields.CharField(max_length=30, unique=True, description="帳號")
|
|
|
+ password = fields.CharField(max_length=128, description="密碼")
|
|
|
+ email = fields.CharField(max_length=128, description="信箱")
|
|
|
+ points = fields.IntField(description="點數")
|
|
|
+
|
|
|
+#學校
|
|
|
+class Schools(Model):
|
|
|
+ id = fields.IntField(pk=True)
|
|
|
+ name = fields.CharField(max_length=45, description="學校名稱")
|
|
|
+ longitude = fields.CharField(max_length=100, description="經度")
|
|
|
+ latitude = fields.CharField(max_length=100, description="緯度")
|
|
|
+ group_id = fields.IntField(description="學群")
|
|
|
+ address = fields.CharField(max_length=128,description="地址")
|
|
|
+
|
|
|
+class School_group(Model):
|
|
|
+ id = fields.IntField(pk=True)
|
|
|
+ group_name = fields.CharField(max_length=45, description="學群名稱")
|
|
|
+
|
|
|
+class Class_name(Model):
|
|
|
+ id = fields.IntField(pk=True)
|
|
|
+ name = fields.CharField(max_length=45, description="課程名稱")
|
|
|
+ school_id = fields.IntField(description="學校ID")
|
|
|
+ category = fields.CharField(max_length=45, description="分類")
|
|
|
+ introduction = fields.TextField(description="簡介")
|
|
|
+ organizer = fields.CharField(max_length=45, description="主辦單位")
|
|
|
+ cover_img = fields.CharField(max_length=255, description="封面圖片")
|
|
|
+
|
|
|
+
|
|
|
+class Class_list(Model):
|
|
|
+ id = fields.IntField(pk=True)
|
|
|
+ name_id = fields.IntField(description="課程名稱ID")
|
|
|
+ event = fields.CharField(max_length=45, description="場次")
|
|
|
+ start_time = fields.DatetimeField(description="開始時間")
|
|
|
+ end_time = fields.DatetimeField(description="結束時間")
|
|
|
+ contact = fields.CharField(max_length=255, description="聯絡方式")
|
|
|
+ lecturer = fields.CharField(max_length=255, description="講師")
|
|
|
+ location = fields.CharField(max_length=255, description="地點詳情")
|
|
|
+ content = fields.TextField(description="內容")
|
|
|
+ URL = fields.TextField(description="連結網址")
|
|
|
+ people = fields.CharField(max_length=255, description="對象")
|
|
|
+ fee_method = fields.CharField(max_length=255, description="收費方式")
|
|
|
+ registration_way = fields.CharField(max_length=255, description="報名方式")
|
|
|
+ remark = fields.TextField(description="備註")
|
|
|
+
|
|
|
+
|
|
|
+class Class_detail(Model):
|
|
|
+ id = fields.IntField(pk=True)
|
|
|
+ class_list_id = fields.IntField(description="課程ID")
|
|
|
+ start_time = fields.DatetimeField(description="開始時間")
|
|
|
+ end_time = fields.DatetimeField(description="結束時間")
|
|
|
+ sessions = fields.IntField(description="堂數")
|
|
|
+ content = fields.TextField(description="內容")
|
|
|
+
|
|
|
+class Registration(Model):
|
|
|
+ id = fields.IntField(pk=True)
|
|
|
+ class_id = fields.IntField(description="課程ID")
|
|
|
+ user_id = fields.IntField(description="使用者ID")
|
|
|
+ reg_confirm = fields.CharField(max_length=255, description="報名確認(1:報名成功 0:單純報名)")
|
|
|
+ is_del = fields.CharField(max_length=255, description="是否取消(1:yes ,0:no)")
|
|
|
create_time = fields.DatetimeField(description="創建時間")
|