feat(cms): improve catalog, editorial recovery and operations
This commit is contained in:
1 parent
2fead134e6
commit
c389c3893d
122 files changed
+8137
-703
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
bigint,
|
||||
int,
|
||||
longtext,
|
||||
mysqlTable,
|
||||
primaryKey,
|
||||
timestamp,
|
||||
varchar,
|
||||
} from "drizzle-orm/mysql-core";
|
||||
|
||||
export const ArticleDrafts = mysqlTable(
|
||||
"website_article_drafts",
|
||||
{
|
||||
userId: bigint("user_id", { mode: "number", unsigned: true }).notNull(),
|
||||
articleKey: varchar("article_key", { length: 32 }).notNull(),
|
||||
version: int("version", { unsigned: true }).notNull(),
|
||||
payload: longtext("payload").notNull(),
|
||||
updatedAt: timestamp("updated_at").notNull().defaultNow(),
|
||||
},
|
||||
(table) => [primaryKey({ columns: [table.userId, table.articleKey] })],
|
||||
);
|
||||
export const ArticleRevisions = mysqlTable("website_article_revisions", {
|
||||
id: bigint("id", { mode: "number", unsigned: true })
|
||||
.autoincrement()
|
||||
.primaryKey(),
|
||||
articleId: bigint("article_id", { mode: "bigint", unsigned: true }).notNull(),
|
||||
userId: bigint("user_id", { mode: "number", unsigned: true }).notNull(),
|
||||
payload: longtext("payload").notNull(),
|
||||
createdAt: timestamp("created_at").notNull().defaultNow(),
|
||||
});
|
||||
Reference in new issue
Block a user