feat: implement LMS core (CMS, Courses, Enrollment, Progress, Auth) (Admin + API)
Build & Push Docker Image (Backend) / build (push) Successful in 54s
Build & Push Docker Image (Backend) / build (push) Successful in 54s
This commit is contained in:
+14
-3
@@ -1,3 +1,14 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
from django.db import models
|
||||
|
||||
class Article(models.Model):
|
||||
title = models.CharField(max_length=200) # หัวข้อบทความ
|
||||
body = models.TextField() # เนื้อหา
|
||||
published = models.BooleanField(default=False) # ใช้เปิด/ปิดการแสดงผล
|
||||
created_at = models.DateTimeField(auto_now_add=True) # เวลาสร้าง (เอาไว้ sort / paginate)
|
||||
|
||||
class Meta:
|
||||
verbose_name = "บทความ"
|
||||
verbose_name_plural = "บทความ"
|
||||
|
||||
def __str__(self):
|
||||
return self.title
|
||||
|
||||
Reference in New Issue
Block a user