mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
20 lines
811 B
Python
20 lines
811 B
Python
# Author: Junjun
|
|
# Date: 2026/1/26
|
|
|
|
from datetime import datetime
|
|
from typing import List
|
|
|
|
from sqlalchemy import Column, BigInteger, Identity, DateTime
|
|
from sqlalchemy.dialects.postgresql import JSONB
|
|
from sqlmodel import SQLModel, Field
|
|
|
|
|
|
class SystemVariable(SQLModel, table=True):
|
|
__tablename__ = "system_variable"
|
|
id: int = Field(sa_column=Column(BigInteger, Identity(always=True), nullable=False, primary_key=True))
|
|
name: str = Field(max_length=128, nullable=False)
|
|
var_type: str = Field(max_length=128, nullable=False)
|
|
type: str = Field(max_length=128, nullable=False)
|
|
value: List = Field(sa_column=Column(JSONB, nullable=True))
|
|
create_time: datetime = Field(sa_column=Column(DateTime(timezone=False), nullable=True))
|
|
create_by: int = Field(sa_column=Column(BigInteger())) |