我正在构建一个应用程序,公司可以定期支付订阅费用。这让他们在我们的网站上列出了详细的清单,并获得了许多其他(现实世界)的好处。当他们的订阅到期时,他们的列表将显示较少的详细信息,直到他们再次支付。
我使用Directus作为后端,使用Vue.js作为前端。我希望Vue前端的“业务逻辑”越少越好。
该公司的MySQL表DDL是
create table company
(
id int(11) unsigned auto_increment primary key,
name varchar(200) not null comment 'name of company',
description text not null,
address text null comment 'company physical address'
web_site varchar(200) not null,
... many other fields
subscription_expires datetime,
created_on datetime null,
modified_on datetime null,
)
charset = utf8mb4;我想创建许多MySQL计算字段:例如,如果为subscription_expires is null or subscription_expires < now(),则company.show_details字段为false;如果为modified_on > 24 months ago,则为company.needs_update true。这将使Vue呈现逻辑非常清晰/明显。
我看不到通过Directus创建计算字段的方法,也看不到通过mysql模式同步它们的方法。有没有什么文档?
谢谢!
发布于 2020-11-28 08:45:07
我相信这仍然是对Directus的一个功能请求。也许可以提高它的支持率,给它更多的牵引力?
https://stackoverflow.com/questions/65042214
复制相似问题